lightbulb_outline Help shape the future of the Google Play Console, Android Studio, and Firebase. Start survey
added in version 22.1.0
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1

ViewConfigurationCompat

public final class ViewConfigurationCompat
extends Object

java.lang.Object
   ↳ android.support.v4.view.ViewConfigurationCompat


Helper for accessing features in ViewConfiguration.

Summary

Public methods

static float getScaledHorizontalScrollFactor(ViewConfiguration config, Context context)
static int getScaledHoverSlop(ViewConfiguration config)
static int getScaledPagingTouchSlop(ViewConfiguration config)

This method was deprecated in API level 25.1.0. Call getScaledPagingTouchSlop() directly. This method will be removed in a future release.

static float getScaledVerticalScrollFactor(ViewConfiguration config, Context context)
static boolean hasPermanentMenuKey(ViewConfiguration config)

This method was deprecated in API level 26.1.0. Use hasPermanentMenuKey() directly.

Inherited methods

From class java.lang.Object

Public methods

getScaledHorizontalScrollFactor

added in version 26.1.0
float getScaledHorizontalScrollFactor (ViewConfiguration config, 
                Context context)

Parameters
config ViewConfiguration: Used to get the scaling factor directly from the ViewConfiguration.

context Context: Used to locate a resource value.

Returns
float Amount to scroll in response to a horizontal ACTION_SCROLL event. Multiply this by the event's axis value to obtain the number of pixels to be scrolled.

getScaledHoverSlop

int getScaledHoverSlop (ViewConfiguration config)

Parameters
config ViewConfiguration: Used to get the hover slop directly from the ViewConfiguration.

Returns
int The hover slop value.

getScaledPagingTouchSlop

added in version 22.1.0
int getScaledPagingTouchSlop (ViewConfiguration config)

This method was deprecated in API level 25.1.0.
Call getScaledPagingTouchSlop() directly. This method will be removed in a future release.

Call getScaledPagingTouchSlop().

Parameters
config ViewConfiguration

Returns
int

getScaledVerticalScrollFactor

added in version 26.1.0
float getScaledVerticalScrollFactor (ViewConfiguration config, 
                Context context)

Parameters
config ViewConfiguration: Used to get the scaling factor directly from the ViewConfiguration.

context Context: Used to locate a resource value.

Returns
float Amount to scroll in response to a vertical ACTION_SCROLL event. Multiply this by the event's axis value to obtain the number of pixels to be scrolled.

hasPermanentMenuKey

added in version 22.1.0
boolean hasPermanentMenuKey (ViewConfiguration config)

This method was deprecated in API level 26.1.0.
Use hasPermanentMenuKey() directly.

Report if the device has a permanent menu key available to the user, in a backwards compatible way.

Parameters
config ViewConfiguration

Returns
boolean