ViewConfigurationCompat
public
final
class
ViewConfigurationCompat
extends Object
java.lang.Object
|
↳ |
androidx.core.view.ViewConfigurationCompat
|
Helper for accessing features in ViewConfiguration
.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
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.
|
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 |
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.
|