public class RotationGestureOverlay extends Overlay implements RotationGestureDetector.RotationListener, IOverlayMenuProvider
Overlay.Snappable
Modifier and Type | Field and Description |
---|---|
(package private) float |
currentAngle |
(package private) long |
deltaTime |
(package private) long |
timeLastSet |
SHADOW_X_SKEW, SHADOW_Y_SCALE
DEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET
Constructor and Description |
---|
RotationGestureOverlay(Context context,
MapView mapView)
Deprecated.
|
RotationGestureOverlay(MapView mapView) |
Modifier and Type | Method and Description |
---|---|
void |
draw(Canvas c,
MapView osmv,
boolean shadow)
Draw the overlay over the map.
|
boolean |
isOptionsMenuEnabled()
Can be used to signal to external callers that this Overlay should not be used for providing
option menu items.
|
boolean |
onCreateOptionsMenu(Menu pMenu,
int pMenuIdOffset,
MapView pMapView) |
void |
onDetach(MapView map)
Override to perform clean up of resources before shutdown.
|
boolean |
onOptionsItemSelected(MenuItem pItem,
int pMenuIdOffset,
MapView pMapView) |
boolean |
onPrepareOptionsMenu(Menu pMenu,
int pMenuIdOffset,
MapView pMapView) |
void |
onRotate(float deltaAngle) |
boolean |
onTouchEvent(MotionEvent event,
MapView mapView)
You can prevent all(!) other Touch-related events from happening!
By default does nothing ( return false ). |
void |
setOptionsMenuEnabled(boolean enabled) |
drawAt, getSafeMenuId, getSafeMenuIdSequence, isEnabled, onDoubleTap, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onLongPress, onScroll, onShowPress, onSingleTapConfirmed, onSingleTapUp, onTrackballEvent, setEnabled
long timeLastSet
final long deltaTime
float currentAngle
@Deprecated public RotationGestureOverlay(Context context, MapView mapView)
RotationGestureOverlay(MapView)
instead.public RotationGestureOverlay(MapView mapView)
public void draw(Canvas c, MapView osmv, boolean shadow)
Overlay
public boolean onTouchEvent(MotionEvent event, MapView mapView)
Overlay
return false
). If you handled the Event, return true
, otherwise return false
. If you returned true
none of the following Overlays
or the underlying MapView
has the chance to handle this event.onTouchEvent
in class Overlay
public void onRotate(float deltaAngle)
onRotate
in interface RotationGestureDetector.RotationListener
public void onDetach(MapView map)
Overlay
public boolean isOptionsMenuEnabled()
IOverlayMenuProvider
isOptionsMenuEnabled
in interface IOverlayMenuProvider
public boolean onCreateOptionsMenu(Menu pMenu, int pMenuIdOffset, MapView pMapView)
onCreateOptionsMenu
in interface IOverlayMenuProvider
public boolean onOptionsItemSelected(MenuItem pItem, int pMenuIdOffset, MapView pMapView)
onOptionsItemSelected
in interface IOverlayMenuProvider
public boolean onPrepareOptionsMenu(Menu pMenu, int pMenuIdOffset, MapView pMapView)
onPrepareOptionsMenu
in interface IOverlayMenuProvider
public void setOptionsMenuEnabled(boolean enabled)
setOptionsMenuEnabled
in interface IOverlayMenuProvider