ViewConfigurationCompat
class ViewConfigurationCompat
kotlin.Any | |
↳ | androidx.core.view.ViewConfigurationCompat |
Helper for accessing features in ViewConfiguration
.
Summary
Public methods |
|
---|---|
static Float |
getScaledHorizontalScrollFactor(@NonNull config: ViewConfiguration, @NonNull context: Context) |
static Int |
getScaledHoverSlop(config: ViewConfiguration!) |
static Int |
getScaledPagingTouchSlop(config: ViewConfiguration!) |
static Float |
getScaledVerticalScrollFactor(@NonNull config: ViewConfiguration, @NonNull context: Context) |
static Boolean |
hasPermanentMenuKey(config: ViewConfiguration!) Report if the device has a permanent menu key available to the user, in a backwards compatible way. |
static Boolean |
shouldShowMenuShortcutsWhenKeyboardPresent(config: ViewConfiguration!, @NonNull context: Context) Check if shortcuts should be displayed in menus. |
Public methods
getScaledHorizontalScrollFactor
static fun getScaledHorizontalScrollFactor(@NonNull config: ViewConfiguration, @NonNull context: Context): Float
Parameters | |
---|---|
config |
ViewConfiguration: Used to get the scaling factor directly from the ViewConfiguration . |
context |
ViewConfiguration: Used to locate a resource value. |
Return | |
---|---|
Float: Amount to scroll in response to a horizontal MotionEventCompat#ACTION_SCROLL event. Multiply this by the event's axis value to obtain the number of pixels to be scrolled. |
getScaledHoverSlop
static fun getScaledHoverSlop(config: ViewConfiguration!): Int
Parameters | |
---|---|
config |
ViewConfiguration!: Used to get the hover slop directly from the ViewConfiguration . |
Return | |
---|---|
Int: The hover slop value. |
getScaledPagingTouchSlop
static fungetScaledPagingTouchSlop(config: ViewConfiguration!): Int
Deprecated: Call ViewConfiguration#getScaledPagingTouchSlop()
directly. This method will be removed in a future release.
getScaledVerticalScrollFactor
static fun getScaledVerticalScrollFactor(@NonNull config: ViewConfiguration, @NonNull context: Context): Float
Parameters | |
---|---|
config |
ViewConfiguration: Used to get the scaling factor directly from the ViewConfiguration . |
context |
ViewConfiguration: Used to locate a resource value. |
Return | |
---|---|
Float: Amount to scroll in response to a vertical MotionEventCompat#ACTION_SCROLL event. Multiply this by the event's axis value to obtain the number of pixels to be scrolled. |
hasPermanentMenuKey
static funhasPermanentMenuKey(config: ViewConfiguration!): Boolean
Deprecated: Use ViewConfiguration#hasPermanentMenuKey()
directly.
Report if the device has a permanent menu key available to the user, in a backwards compatible way.
shouldShowMenuShortcutsWhenKeyboardPresent
static fun shouldShowMenuShortcutsWhenKeyboardPresent(config: ViewConfiguration!, @NonNull context: Context): Boolean
Check if shortcuts should be displayed in menus.
Return | |
---|---|
Boolean: True if shortcuts should be displayed in menus. |