ViewConfigurationCompat
public
final
class
ViewConfigurationCompat
extends Object
| java.lang.Object | |
| ↳ | androidx.core.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 is deprecated.
Call |
static
float
|
getScaledVerticalScrollFactor(ViewConfiguration config, Context context)
|
static
boolean
|
hasPermanentMenuKey(ViewConfiguration config)
This method is deprecated.
Use |
static
boolean
|
shouldShowMenuShortcutsWhenKeyboardPresent(ViewConfiguration config, Context context)
Check if shortcuts should be displayed in menus. |
Inherited methods | |
|---|---|
Public methods
getScaledHorizontalScrollFactor
public static 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 MotionEventCompat.ACTION_SCROLL
event. Multiply this by the event's axis value to obtain the number of pixels to be
scrolled.
|
getScaledHoverSlop
public static int getScaledHoverSlop (ViewConfiguration config)
| Parameters | |
|---|---|
config |
ViewConfiguration: Used to get the hover slop directly from the ViewConfiguration. |
| Returns | |
|---|---|
int |
The hover slop value. |
getScaledPagingTouchSlop
public static int getScaledPagingTouchSlop (ViewConfiguration config)
This method is deprecated.
Call ViewConfiguration.getScaledPagingTouchSlop() directly.
This method will be removed in a future release.
Call ViewConfiguration.getScaledPagingTouchSlop().
| Parameters | |
|---|---|
config |
ViewConfiguration |
| Returns | |
|---|---|
int |
|
getScaledVerticalScrollFactor
public static 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 MotionEventCompat.ACTION_SCROLL
event. Multiply this by the event's axis value to obtain the number of pixels to be
scrolled.
|
hasPermanentMenuKey
public static boolean hasPermanentMenuKey (ViewConfiguration config)
This method is deprecated.
Use ViewConfiguration.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 |
|
shouldShowMenuShortcutsWhenKeyboardPresent
public static boolean shouldShowMenuShortcutsWhenKeyboardPresent (ViewConfiguration config, Context context)
Check if shortcuts should be displayed in menus.
| Parameters | |
|---|---|
config |
ViewConfiguration |
context |
Context |
| Returns | |
|---|---|
boolean |
True if shortcuts should be displayed in menus.
|
Interfaces
- ActionProvider.VisibilityListener
- DragStartHelper.OnDragStartListener
- LayoutInflaterFactory
- MenuItemCompat.OnActionExpandListener
- NestedScrollingChild
- NestedScrollingChild2
- NestedScrollingChild3
- NestedScrollingParent
- NestedScrollingParent2
- NestedScrollingParent3
- OnApplyWindowInsetsListener
- ScrollingView
- TintableBackgroundView
- ViewCompat.OnUnhandledKeyEventListenerCompat
- ViewPropertyAnimatorListener
- ViewPropertyAnimatorUpdateListener
Classes
- AccessibilityDelegateCompat
- ActionProvider
- DisplayCutoutCompat
- DragAndDropPermissionsCompat
- DragStartHelper
- GestureDetectorCompat
- GravityCompat
- InputDeviceCompat
- LayoutInflaterCompat
- MarginLayoutParamsCompat
- MenuCompat
- MenuItemCompat
- MotionEventCompat
- NestedScrollingChildHelper
- NestedScrollingParentHelper
- OneShotPreDrawListener
- PointerIconCompat
- ScaleGestureDetectorCompat
- VelocityTrackerCompat
- ViewCompat
- ViewConfigurationCompat
- ViewGroupCompat
- ViewParentCompat
- ViewPropertyAnimatorCompat
- ViewPropertyAnimatorListenerAdapter
- WindowCompat
- WindowInsetsCompat