public abstract class ForwardingListener extends Object implements View.OnTouchListener
ShowableListMenu
.Constructor and Description |
---|
ForwardingListener(View src) |
Modifier and Type | Method and Description |
---|---|
abstract ShowableListMenu |
getPopup()
Returns the popup to which this listener is forwarding events.
|
protected boolean |
onForwardingStarted()
Called when forwarding would like to start.
|
protected boolean |
onForwardingStopped()
Called when forwarding would like to stop.
|
boolean |
onTouch(View v,
MotionEvent event)
Called when a touch event is dispatched to a view.
|
public ForwardingListener(View src)
public abstract ShowableListMenu getPopup()
Override this to return the correct popup. If the popup is displayed
asynchronously, you may also need to override
onForwardingStopped()
to prevent premature cancelation of
forwarding.
public boolean onTouch(View v, MotionEvent event)
View.OnTouchListener
onTouch
in interface View.OnTouchListener
v
- The view the touch event has been dispatched to.event
- The MotionEvent object containing full information about
the event.protected boolean onForwardingStarted()
By default, this will show the popup returned by getPopup()
.
It may be overridden to perform another action, like clicking the
source view or preparing the popup before showing it.
protected boolean onForwardingStopped()
By default, this will dismiss the popup returned by
getPopup()
. It may be overridden to perform some other
action.