Most visited

Recently visited

Added in API level 1

ZoomControls

public class ZoomControls
extends LinearLayout

java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.LinearLayout
         ↳ android.widget.ZoomControls


The ZoomControls class displays a simple set of controls used for zooming and provides callbacks to register for events.

Summary

Inherited XML attributes

From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View

Inherited constants

From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View

Inherited fields

From class android.view.View

Public constructors

ZoomControls(Context context)
ZoomControls(Context context, AttributeSet attrs)

Public methods

CharSequence getAccessibilityClassName()

Return the class name of this object to be used for accessibility purposes.

boolean hasFocus()

Returns true if this view has or contains focus

void hide()
boolean onTouchEvent(MotionEvent event)

Implement this method to handle touch screen motion events.

void setIsZoomInEnabled(boolean isEnabled)
void setIsZoomOutEnabled(boolean isEnabled)
void setOnZoomInClickListener(View.OnClickListener listener)
void setOnZoomOutClickListener(View.OnClickListener listener)
void setZoomSpeed(long speed)
void show()

Inherited methods

From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.view.ViewParent
From interface android.view.ViewManager
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public constructors

ZoomControls

Added in API level 1
ZoomControls (Context context)

Parameters
context Context

ZoomControls

Added in API level 1
ZoomControls (Context context, 
                AttributeSet attrs)

Parameters
context Context
attrs AttributeSet

Public methods

getAccessibilityClassName

Added in API level 23
CharSequence getAccessibilityClassName ()

Return the class name of this object to be used for accessibility purposes. Subclasses should only override this if they are implementing something that should be seen as a completely new class of view when used by accessibility, unrelated to the class it is deriving from. This is used to fill in AccessibilityNodeInfo.setClassName.

Returns
CharSequence

hasFocus

Added in API level 1
boolean hasFocus ()

Returns true if this view has or contains focus

Returns
boolean true if this view has or contains focus

hide

Added in API level 1
void hide ()

onTouchEvent

Added in API level 1
boolean onTouchEvent (MotionEvent event)

Implement this method to handle touch screen motion events.

If this method is used to detect click actions, it is recommended that the actions be performed by implementing and calling performClick(). This will ensure consistent system behavior, including:

  • obeying click sound preferences
  • dispatching OnClickListener calls
  • handling ACTION_CLICK when accessibility features are enabled

Parameters
event MotionEvent: The motion event.
Returns
boolean True if the event was handled, false otherwise.

setIsZoomInEnabled

Added in API level 1
void setIsZoomInEnabled (boolean isEnabled)

Parameters
isEnabled boolean

setIsZoomOutEnabled

Added in API level 1
void setIsZoomOutEnabled (boolean isEnabled)

Parameters
isEnabled boolean

setOnZoomInClickListener

Added in API level 1
void setOnZoomInClickListener (View.OnClickListener listener)

Parameters
listener View.OnClickListener

setOnZoomOutClickListener

Added in API level 1
void setOnZoomOutClickListener (View.OnClickListener listener)

Parameters
listener View.OnClickListener

setZoomSpeed

Added in API level 1
void setZoomSpeed (long speed)

Parameters
speed long

show

Added in API level 1
void show ()

Hooray!