Nested classes |
interface |
TitleViewAdapter.Provider
Interface to be implemented by a customized widget class to implement
TitleViewAdapter .
|
Inherited methods |
From
class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Constants
BRANDING_VIEW_VISIBLE
int BRANDING_VIEW_VISIBLE
Constant Value:
2
(0x00000002)
FULL_VIEW_VISIBLE
int FULL_VIEW_VISIBLE
Constant Value:
6
(0x00000006)
SEARCH_VIEW_VISIBLE
int SEARCH_VIEW_VISIBLE
Constant Value:
4
(0x00000004)
Public constructors
TitleViewAdapter
TitleViewAdapter ()
Public methods
getBadgeDrawable
Drawable getBadgeDrawable ()
Returns the badge drawable.
getSearchAffordanceView
View getSearchAffordanceView ()
Returns the view for the search affordance.
Returns |
View |
The view for search affordance.
|
getTitle
CharSequence getTitle ()
Returns the title text.
Returns |
CharSequence |
The title text.
|
setAnimationEnabled
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
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
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.
|
setSearchAffordanceColors
void setSearchAffordanceColors (SearchOrbView.Colors colors)
Sets the SearchOrbView.Colors
used to draw the
search affordance.
Parameters |
colors |
SearchOrbView.Colors : Colors used to draw search affordance.
|
setTitle
void setTitle (CharSequence titleText)
Sets the title text.
Parameters |
titleText |
CharSequence : The text to set as title.
|
updateComponentsVisibility
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 and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-11 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-11 UTC."],[],[]]