public class ToolbarButton
extends java.lang.Object
implements android.view.GestureDetector.OnGestureListener
Modifier and Type | Class and Description |
---|---|
static interface |
ToolbarButton.OnSwipeListener |
Constructor and Description |
---|
ToolbarButton(android.widget.Button button) |
ToolbarButton(java.lang.String menuIdentifier,
android.view.View view) |
Modifier and Type | Method and Description |
---|---|
void |
addOnClickListener(android.view.View.OnClickListener listener)
Allow a tool bar button to have one or more click listeners.
|
void |
addOnClickListeners(java.util.List<android.view.View.OnClickListener> listeners) |
void |
addOnLongClickListener(android.view.View.OnLongClickListener listener) |
void |
addSwipeListener(ToolbarButton.OnSwipeListener listener) |
void |
dispose() |
android.widget.Button |
getButton() |
void |
initialize(java.lang.String menuIdentifier,
android.widget.Button button) |
boolean |
onDown(android.view.MotionEvent e) |
boolean |
onFling(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float velocityX,
float velocityY) |
void |
onLongPress(android.view.MotionEvent e) |
boolean |
onScroll(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float distanceX,
float distanceY) |
void |
onShowPress(android.view.MotionEvent e) |
boolean |
onSingleTapUp(android.view.MotionEvent e) |
void |
resetOnClickListeners() |
void |
setLaunchableMenu(IMenu menu) |
void |
setLaunchableMenu(java.lang.String identifier) |
void |
showMenu() |
void |
updateBackground() |
void |
updateButton(android.graphics.drawable.Drawable[] icons,
java.lang.String label) |
public ToolbarButton(java.lang.String menuIdentifier, android.view.View view)
public ToolbarButton(android.widget.Button button)
public void dispose()
public android.widget.Button getButton()
public void initialize(java.lang.String menuIdentifier, android.widget.Button button)
public void addOnClickListener(android.view.View.OnClickListener listener)
listener
- the click listener.public void addOnLongClickListener(android.view.View.OnLongClickListener listener)
public void addSwipeListener(ToolbarButton.OnSwipeListener listener)
public void updateButton(android.graphics.drawable.Drawable[] icons, java.lang.String label)
public void setLaunchableMenu(java.lang.String identifier)
public void setLaunchableMenu(IMenu menu)
public void showMenu()
public boolean onDown(android.view.MotionEvent e)
onDown
in interface android.view.GestureDetector.OnGestureListener
public boolean onFling(android.view.MotionEvent e1, android.view.MotionEvent e2, float velocityX, float velocityY)
onFling
in interface android.view.GestureDetector.OnGestureListener
public void onLongPress(android.view.MotionEvent e)
onLongPress
in interface android.view.GestureDetector.OnGestureListener
public boolean onScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float distanceX, float distanceY)
onScroll
in interface android.view.GestureDetector.OnGestureListener
public void onShowPress(android.view.MotionEvent e)
onShowPress
in interface android.view.GestureDetector.OnGestureListener
public boolean onSingleTapUp(android.view.MotionEvent e)
onSingleTapUp
in interface android.view.GestureDetector.OnGestureListener
public void addOnClickListeners(java.util.List<android.view.View.OnClickListener> listeners)
public void resetOnClickListeners()
public void updateBackground()