10package org.mozilla.gecko;
12import android.content.Context;
13import android.view.GestureDetector;
14import android.view.GestureDetector.SimpleOnGestureListener;
15import android.view.MotionEvent;
16import android.view.View;
17import android.view.View.OnTouchListener;
18import android.util.Log;
42 public boolean onDown(MotionEvent e) {
47 public boolean onFling(MotionEvent e1, MotionEvent e2,
float velX,
float velY) {
59 float diffY = e2.getY() - e1.getY();
60 float diffX = e2.getX() - e1.getX();
61 if (
Math.abs(diffX) >
Math.abs(diffY)) {
72 exception.printStackTrace();
89 public boolean onTouch(View v, MotionEvent me) {
Common static LOKit functions, functions to send events.
static void sendSwipeLeftEvent()
static void sendSwipeRightEvent()
boolean onDown(MotionEvent e)
boolean onFling(MotionEvent e1, MotionEvent e2, float velX, float velY)
static final int SWIPE_VELOCITY_THRESHOLD
static final int SWIPE_THRESHOLD
GeckoLayerClient mLayerClient
OnSlideSwipeListener(Context ctx, GeckoLayerClient client)
final GestureDetector mGestureDetector
boolean onTouch(View v, MotionEvent me)
ImmutableViewportMetrics getViewportMetrics()
Implementation of PanZoomTarget.
ImmutableViewportMetrics are used to store the viewport metrics in way that we can access a version o...
final float viewportRectRight
final float viewportRectLeft
final float pageRectRight