Added in API level 1
Deprecated in API level 26

ZoomButton

open class ZoomButton : ImageButton, View.OnLongClickListener
kotlin.Any
   ↳ android.view.View
   ↳ android.widget.ImageView
   ↳ android.widget.ImageButton
   ↳ android.widget.ZoomButton

This widget provides a simple utility for turning a continued long-press event into a series of clicks at some set frequency. There is no actual 'zoom' functionality handled by this widget directly. Instead, clients of this API should set up an View#setOnClickListener(OnClickListener) to handle zoom functionality. That click listener is called on a frequency determined by setZoomSpeed(long) whenever the user long-presses on the ZoomButton.

Summary

Inherited XML attributes

Inherited constants

Public constructors

<init>(context: Context!)

<init>(context: Context!, attrs: AttributeSet!)

<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int)

Public methods

open Boolean
dispatchUnhandledMove(focused: View!, direction: Int)

open CharSequence!

open Boolean
onKeyUp(keyCode: Int, event: KeyEvent!)

open Boolean

open Boolean

open Unit
setEnabled(enabled: Boolean)

open Unit

Sets the delay between calls to the widget's View#setOnClickListener(OnClickListener).

Inherited functions

Inherited properties

Public constructors

<init>

Added in API level 1
ZoomButton(context: Context!)

<init>

Added in API level 1
ZoomButton(context: Context!, attrs: AttributeSet!)

<init>

Added in API level 1
ZoomButton(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

<init>

Added in API level 21
ZoomButton(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int)

Public methods

dispatchUnhandledMove

Added in API level 1
Deprecated in API level 26
open fun dispatchUnhandledMove(focused: View!, direction: Int): Boolean

Deprecated.

Parameters
focused View!: The currently focused view.
direction View!: The direction focus wants to move. One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT. Value is android.view.View#FOCUS_LEFT, android.view.View#FOCUS_UP, android.view.View#FOCUS_RIGHT, or android.view.View#FOCUS_DOWN
Return
Boolean: True if the this view consumed this unhandled move.

getAccessibilityClassName

Added in API level 23
Deprecated in API level 26
open fun getAccessibilityClassName(): CharSequence!

Deprecated.

onKeyUp

Added in API level 1
Deprecated in API level 26
open fun onKeyUp(keyCode: Int, event: KeyEvent!): Boolean

Deprecated.

Parameters
keyCode Int: A key code that represents the button pressed, from android.view.KeyEvent.
event Int: The KeyEvent object that defines the button action.
Return
Boolean: If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.

onLongClick

Added in API level 1
Deprecated in API level 26
open fun onLongClick(v: View!): Boolean

Deprecated.

Parameters
v View!: The view that was clicked and held.
Return
Boolean: true if the callback consumed the long click, false otherwise.

onTouchEvent

Added in API level 1
Deprecated in API level 26
open fun onTouchEvent(event: MotionEvent!): Boolean

Deprecated.

Parameters
event MotionEvent!: The motion event.
Return
Boolean: True if the event was handled, false otherwise.

setEnabled

Added in API level 1
Deprecated in API level 26
open fun setEnabled(enabled: Boolean): Unit

Deprecated.

Parameters
enabled Boolean: True if this view is enabled, false otherwise.

setZoomSpeed

Added in API level 1
Deprecated in API level 26
open fun setZoomSpeed(speed: Long): Unit

Deprecated.

Sets the delay between calls to the widget's View#setOnClickListener(OnClickListener).

Parameters
speed Long: The delay between calls to the click listener, in milliseconds