public final class FloatingToolbar extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FLOATING_TOOLBAR_TAG |
Constructor and Description |
---|
FloatingToolbar(Context context,
Window window)
Initializes a floating toolbar.
|
Modifier and Type | Method and Description |
---|---|
void |
dismiss()
Dismisses this floating toolbar.
|
void |
hide()
Hides this floating toolbar.
|
boolean |
isHidden()
Returns
true if this toolbar is currently hidden. |
boolean |
isShowing()
Returns
true if this toolbar is currently showing. |
FloatingToolbar |
setContentRect(Rect rect)
Sets the content rectangle.
|
FloatingToolbar |
setMenu(Menu menu)
Sets the menu to be shown in this floating toolbar.
|
FloatingToolbar |
setOnMenuItemClickListener(MenuItem.OnMenuItemClickListener menuItemClickListener)
Sets the custom listener for invocation of menu items in this floating toolbar.
|
FloatingToolbar |
setSuggestedWidth(int suggestedWidth)
Sets the suggested width of this floating toolbar.
|
FloatingToolbar |
show()
Shows this floating toolbar.
|
FloatingToolbar |
updateLayout()
Updates this floating toolbar to reflect recent position and view updates.
|
public static final String FLOATING_TOOLBAR_TAG
public FloatingToolbar setMenu(Menu menu)
updateLayout()
or show()
to effect visual changes to the
toolbar.public FloatingToolbar setOnMenuItemClickListener(MenuItem.OnMenuItemClickListener menuItemClickListener)
public FloatingToolbar setContentRect(Rect rect)
updateLayout()
or show()
to effect visual changes to the
toolbar.public FloatingToolbar setSuggestedWidth(int suggestedWidth)
updateLayout()
or show()
to effect visual changes to the
toolbar.public FloatingToolbar show()
public FloatingToolbar updateLayout()
public void dismiss()
public void hide()
isHidden()
to distinguish between a hidden and a dismissed toolbar.public boolean isShowing()
true
if this toolbar is currently showing. false
otherwise.public boolean isHidden()
true
if this toolbar is currently hidden. false
otherwise.