Java android.widget Toolbar fields, constructors, methods, implement or subclass

Example usage for Java android.widget Toolbar fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.widget Toolbar.

The text is from its open source code.

Method

voidaddView(View child)

Adds a child view.

TfindViewById(@IdRes int id)
Finds the first descendant view with the given ID, the view itself if the ID matches #getId() , or null if the ID is invalid (< 0) or there is no matching view in the hierarchy.
ViewgetChildAt(int index)
Returns the view at the specified position in the group.
intgetChildCount()
Returns the number of children in the group.
ContextgetContext()
Returns the context the view is running in, through which it can access the current theme, resources, etc.
DrawablegetNavigationIcon()
Return the current drawable used as the navigation icon.
CharSequencegetSubtitle()
Return the subtitle of this toolbar.
CharSequencegetTitle()
Returns the title of this toolbar.
voidsetNavigationIcon(@DrawableRes int resId)
Set the icon to use for the toolbar's navigation button.
voidsetNavigationIcon(@Nullable Drawable icon)
Set the icon to use for the toolbar's navigation button.
voidsetNavigationOnClickListener(OnClickListener listener)
Set a listener to respond to navigation events.
voidsetVisibility(@Visibility int visibility)
Set the visibility state of this view.