ZoomControls

public class ZoomControls
extends LinearLayout

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


This class was deprecated in API level 29.
This functionality and UI is better handled with custom views and layouts rather than a dedicated zoom-control widget

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

Summary

Inherited XML attributes

Inherited constants

Inherited fields

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

Public constructors

ZoomControls

Added in API level 1
public ZoomControls (Context context)

Parameters
context Context

ZoomControls

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

Parameters
context Context

attrs AttributeSet

Public methods

getAccessibilityClassName

Added in API level 23
Deprecated in API level 29
public 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
public 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
public void hide ()

onTouchEvent

Added in API level 1
public 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
public void setIsZoomInEnabled (boolean isEnabled)

Parameters
isEnabled boolean

setIsZoomOutEnabled

Added in API level 1
public void setIsZoomOutEnabled (boolean isEnabled)

Parameters
isEnabled boolean

setOnZoomInClickListener

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

Parameters
listener View.OnClickListener

setOnZoomOutClickListener

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

Parameters
listener View.OnClickListener

setZoomSpeed

Added in API level 1
public void setZoomSpeed (long speed)

Parameters
speed long

show

Added in API level 1
public void show ()