ZoomBehavior

public final class ZoomBehavior extends Object

ZoomBehavior captures the behavior of pan, zoom, and the presence of zoom buttons.

Constant Summary

int BEHAVIOR_FIXED
int BEHAVIOR_SCROLL_ONLY
int BEHAVIOR_ZOOM_BUTTONS_ONLY
int BEHAVIOR_ZOOM_PINCH_AND_BUTTONS
int BEHAVIOR_ZOOM_PINCH_ONLY
int DEFAULT_BEHAVIOR

Public Constructor Summary

ZoomBehavior(int value)

Public Method Summary

boolean
boolean
boolean
boolean
static ZoomBehavior
loadFromTheme(Context context)

Inherited Method Summary

Constants

public static final int BEHAVIOR_FIXED

Constant Value: 1

public static final int BEHAVIOR_SCROLL_ONLY

Constant Value: 2

public static final int BEHAVIOR_ZOOM_BUTTONS_ONLY

Constant Value: 3

public static final int BEHAVIOR_ZOOM_PINCH_AND_BUTTONS

Constant Value: 5

public static final int BEHAVIOR_ZOOM_PINCH_ONLY

Constant Value: 4

public static final int DEFAULT_BEHAVIOR

Constant Value: 5

Public Constructors

public ZoomBehavior (int value)

Parameters
value

Public Methods

public boolean isButtonEnabled ()

Returns
  • True if zoom-in/out buttons are enabled. Otherwise false.

public boolean isFixed ()

Returns
  • True if the workspace is fixed (neither scalable nor scrollable). Otherwise false.

public boolean isPinchZoomEnabled ()

Returns
  • True if workspace scalable using touch/pinch events. Otherwise false.

public boolean isScrollEnabled ()

Returns
  • True if workspace is scrollable. Otherwise false.

public static ZoomBehavior loadFromTheme (Context context)

Parameters
context