|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.blogspot.applications4android.comicreader.zoom.PanZoomListener
public class PanZoomListener
Class responsible for listening to all sorts of events for pan/zoom
Field Summary | |
---|---|
static long |
DELAY_VISIBILITY
time taken (in ms) for changing visibility |
static long |
MAX_DOUBLE_TAP
maximum duration for double tap |
static float |
MIN_DIST_ZOOM
minimum distance difference for working on zoom |
static long |
MIN_DOUBLE_TAP
minimum duration for double tap |
static float |
MIN_FLING_VEL
minimum velocity needed for deciding on a pan-fling |
static float |
MIN_VELX_SWIPE_HORIZONTAL
minimum velocity needed along X for it to be considered for right/left swipe |
static float |
MIN_VELY_SWIPE_VERTICAL
minimum velocity needed along Y for it to be considered for up/down swipe |
static int |
MODE_PAN
DRAG mode |
static int |
MODE_RESET
RESET mode |
static int |
MODE_ZOOM
ZOOM mode |
static int |
MODE_ZOOM_IN
mode = zoom in |
static int |
MODE_ZOOM_OUT
mode = zoom out |
static float |
RATIO_SWIPE_HORIZONTAL
ratio above which is considered to be a right/left swipe |
static float |
RATIO_SWIPE_VERTICAL
ratio above which is considered to be an up/down swipe |
static float |
ZOOM_FACTOR
zomm in/out factor for the button based zoom |
Constructor Summary | |
---|---|
PanZoomListener(PanZoomControl ctrl,
LinearLayout ctrls)
Constructor |
Method Summary | |
---|---|
void |
hideControls()
Hide the control buttons. |
boolean |
onFling(MotionEvent me,
View v)
Callback when the first finger has been lifted |
boolean |
onTouch(View v,
MotionEvent me)
Main function responsible for handling touch events. |
void |
resetChangeVisibility()
Remove the previous callback and set it again. |
void |
setComicActivity(ComicStripViewer ser)
Set the comic activity which needs to be used for displaying previous/next strips |
void |
setModeToPan()
Set the current mode as pan. |
void |
setModeToZoom()
Set the current mode as zoom. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MODE_ZOOM_IN
public static final int MODE_ZOOM_OUT
public static final float MIN_DIST_ZOOM
public static final float ZOOM_FACTOR
public static final long MIN_DOUBLE_TAP
public static final long MAX_DOUBLE_TAP
public static final int MODE_RESET
public static final int MODE_ZOOM
public static final int MODE_PAN
public static final long DELAY_VISIBILITY
public static final float RATIO_SWIPE_HORIZONTAL
public static final float RATIO_SWIPE_VERTICAL
public static final float MIN_VELX_SWIPE_HORIZONTAL
public static final float MIN_VELY_SWIPE_VERTICAL
public static final float MIN_FLING_VEL
Constructor Detail |
---|
public PanZoomListener(PanZoomControl ctrl, LinearLayout ctrls)
ctrl
- the pan/zoom controllerctrls
- controls layoutMethod Detail |
---|
public void setComicActivity(ComicStripViewer ser)
ser
- the comic activitypublic void setModeToZoom()
public void setModeToPan()
public boolean onFling(MotionEvent me, View v)
me
- motion eventv
- view generating this event
public void resetChangeVisibility()
public void hideControls()
public boolean onTouch(View v, MotionEvent me)
v
- the view generating this callback.me
- event generating this callback
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |