Android APIs
public class

ZoomControls

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

Class Overview

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

Summary

[Expand]
Inherited XML Attributes
From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Constants
From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View
[Expand]
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()
[Expand]
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

public ZoomControls (Context context)

Added in API level 1

Parameters
context Context

public ZoomControls (Context context, AttributeSet attrs)

Added in API level 1

Parameters
context Context
attrs AttributeSet

Public Methods

public CharSequence getAccessibilityClassName ()

Added in API level 23

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

public boolean hasFocus ()

Added in API level 1

Returns true if this view has or contains focus

Returns
boolean true if this view has or contains focus

public void hide ()

Added in API level 1

public boolean onTouchEvent (MotionEvent event)

Added in API level 1

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.

public void setIsZoomInEnabled (boolean isEnabled)

Added in API level 1

Parameters
isEnabled boolean

public void setIsZoomOutEnabled (boolean isEnabled)

Added in API level 1

Parameters
isEnabled boolean

public void setOnZoomInClickListener (View.OnClickListener listener)

Added in API level 1

Parameters
listener View.OnClickListener

public void setOnZoomOutClickListener (View.OnClickListener listener)

Added in API level 1

Parameters
listener View.OnClickListener

public void setZoomSpeed (long speed)

Added in API level 1

Parameters
speed long

public void show ()

Added in API level 1