public static class NavButtonModel.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
NavButtonModel |
build()
Build a new button model
|
NavButtonModel.Builder |
setAction(android.content.Intent intent)
Set the intent action fired when this button is pressed
|
NavButtonModel.Builder |
setAction(NavButtonIntentAction action)
Set the intent action fired when this button is pressed
|
NavButtonModel.Builder |
setAction(java.lang.String action)
Set the intent action fired when this button is pressed
|
NavButtonModel.Builder |
setActionLong(android.content.Intent intent)
Set the intent action fired when this button is long-pressed
|
NavButtonModel.Builder |
setActionLong(NavButtonIntentAction action)
Set the intent action fired when this button is long-pressed
|
NavButtonModel.Builder |
setActionLong(java.lang.String action)
Set the intent action fired when this button is long-pressed
|
NavButtonModel.Builder |
setChildButtons(java.util.List<NavButtonModel> buttons)
Set a group of children buttons for this button model
|
NavButtonModel.Builder |
setImage(android.graphics.drawable.Drawable image)
Set the button's default image drawable
|
NavButtonModel.Builder |
setName(java.lang.String name)
Set the name of this button
|
NavButtonModel.Builder |
setReference(java.lang.String reference)
Set the button reference ID
|
NavButtonModel.Builder |
setSelectedImage(android.graphics.drawable.Drawable image)
Set the image drawable used when the button is selected
|
NavButtonModel.Builder |
setSupportedPositions(int positionFlags)
Set the supported positions for this button
|
public NavButtonModel.Builder setReference(java.lang.String reference)
reference
- Reference IDpublic NavButtonModel.Builder setName(java.lang.String name)
name
- Namepublic NavButtonModel.Builder setImage(android.graphics.drawable.Drawable image)
image
- Drawablepublic NavButtonModel.Builder setSelectedImage(android.graphics.drawable.Drawable image)
image
- Drawablepublic NavButtonModel.Builder setAction(NavButtonIntentAction action)
action
- Intent actionpublic NavButtonModel.Builder setAction(android.content.Intent intent)
intent
- Intent actionpublic NavButtonModel.Builder setAction(java.lang.String action)
action
- Intent actionpublic NavButtonModel.Builder setActionLong(NavButtonIntentAction action)
action
- Intent actionpublic NavButtonModel.Builder setActionLong(android.content.Intent intent)
intent
- Intent actionpublic NavButtonModel.Builder setActionLong(java.lang.String action)
action
- Intent actionpublic NavButtonModel.Builder setChildButtons(java.util.List<NavButtonModel> buttons)
buttons
- The list of buttonspublic NavButtonModel.Builder setSupportedPositions(int positionFlags)
positionFlags
- Position flags (NavButtonModel.TOP
or NavButtonModel.LEFT
)public NavButtonModel build()
NavButtonModel