public class NavigationBarGestureHelper extends GestureDetector.SimpleOnGestureListener implements TunerService.Tunable
Modifier and Type | Field and Description |
---|---|
static int |
DRAG_MODE_DIVIDER
When dragging from the navigation bar, we drag the divider.
|
static int |
DRAG_MODE_NONE
When dragging from the navigation bar, we drag in recents.
|
static int |
DRAG_MODE_RECENTS
When dragging from the navigation bar, we drag in recents.
|
Constructor and Description |
---|
NavigationBarGestureHelper(Context context) |
Modifier and Type | Method and Description |
---|---|
boolean |
onFling(MotionEvent e1,
MotionEvent e2,
float velocityX,
float velocityY)
Notified of a fling event when it occurs with the initial on down
MotionEvent
and the matching up MotionEvent . |
boolean |
onInterceptTouchEvent(MotionEvent event) |
boolean |
onTouchEvent(MotionEvent event) |
void |
onTuningChanged(String key,
String newValue) |
void |
setBarState(boolean isVertical,
boolean isRTL) |
void |
setComponents(RecentsComponent recentsComponent,
Divider divider,
NavigationBarView navigationBarView) |
onContextClick, onDoubleTap, onDoubleTapEvent, onDown, onLongPress, onScroll, onShowPress, onSingleTapConfirmed, onSingleTapUp
public static final int DRAG_MODE_NONE
public static final int DRAG_MODE_RECENTS
public static final int DRAG_MODE_DIVIDER
public NavigationBarGestureHelper(Context context)
public void setComponents(RecentsComponent recentsComponent, Divider divider, NavigationBarView navigationBarView)
public void setBarState(boolean isVertical, boolean isRTL)
public boolean onInterceptTouchEvent(MotionEvent event)
public boolean onTouchEvent(MotionEvent event)
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
GestureDetector.OnGestureListener
MotionEvent
and the matching up MotionEvent
. The calculated velocity is supplied along
the x and y axis in pixels per second.onFling
in interface GestureDetector.OnGestureListener
onFling
in class GestureDetector.SimpleOnGestureListener
e1
- The first down motion event that started the fling.e2
- The move motion event that triggered the current onFling.velocityX
- The velocity of this fling measured in pixels per second
along the x axis.velocityY
- The velocity of this fling measured in pixels per second
along the y axis.public void onTuningChanged(String key, String newValue)
onTuningChanged
in interface TunerService.Tunable