setAnimationEnabled
public void setAnimationEnabled (boolean enable)
Enables or disables any view animations. This method is called to save CPU cycle for example
stop search view breathing animation when containing fragment is paused.
| Parameters |
enable |
boolean: True to enable animation, false otherwise.
|
setBadgeDrawable
public void setBadgeDrawable (Drawable drawable)
Sets the badge drawable.
If non-null, the drawable is displayed instead of the title text.
| Parameters |
drawable |
Drawable: The badge drawable to set on title view.
|
setOnSearchClickedListener
public void setOnSearchClickedListener (View.OnClickListener listener)
Sets a click listener for the search affordance view.
The presence of a listener will change the visibility of the search
affordance in the fragment title. When set to non-null, the title will
contain an element that a user may click to begin a search.
The listener's onClick method
will be invoked when the user clicks on the search element.
| Parameters |
listener |
View.OnClickListener: The listener to call when the search element is clicked.
|
updateComponentsVisibility
public void updateComponentsVisibility (int flags)
Based on the flag, it updates the visibility of the individual components -
Branding views (badge drawable and/or title) and search affordance view.
| Parameters |
flags |
int: integer representing the visibility of TitleView components. |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.