InputDevice.MotionRange
public
static
final
class
InputDevice.MotionRange
extends Object
java.lang.Object | |
↳ | android.view.InputDevice.MotionRange |
Provides information about the range of values for a particular MotionEvent
axis.
See also:
Summary
Public methods | |
---|---|
int
|
getAxis()
Gets the axis id. |
float
|
getFlat()
Gets the extent of the center flat position with respect to this axis. |
float
|
getFuzz()
Gets the error tolerance for input device measurements with respect to this axis. |
float
|
getMax()
Gets the inclusive maximum value for the axis. |
float
|
getMin()
Gets the inclusive minimum value for the axis. |
float
|
getRange()
Gets the range of the axis (difference between maximum and minimum). |
float
|
getResolution()
Gets the resolution for input device measurements with respect to this axis. |
int
|
getSource()
Gets the source for which the axis is defined. |
boolean
|
isFromSource(int source)
Determines whether the event is from the given source. |
Inherited methods | |
---|---|
Public methods
getFlat
public float getFlat ()
Gets the extent of the center flat position with respect to this axis.
For example, a flat value of 8 means that the center position is between -8 and +8. This value is mainly useful for calibrating self-centering devices.
Returns | |
---|---|
float |
The extent of the center flat position. |
getFuzz
public float getFuzz ()
Gets the error tolerance for input device measurements with respect to this axis.
For example, a value of 2 indicates that the measured value may be up to +/- 2 units away from the actual value due to noise and device sensitivity limitations.
Returns | |
---|---|
float |
The error tolerance. |
getMax
public float getMax ()
Gets the inclusive maximum value for the axis.
Returns | |
---|---|
float |
The inclusive maximum value. |
getMin
public float getMin ()
Gets the inclusive minimum value for the axis.
Returns | |
---|---|
float |
The inclusive minimum value. |
getRange
public float getRange ()
Gets the range of the axis (difference between maximum and minimum).
Returns | |
---|---|
float |
The range of values. |
getResolution
public float getResolution ()
Gets the resolution for input device measurements with respect to this axis.
Returns | |
---|---|
float |
The resolution in units per millimeter, or units per radian for rotational axes. |
getSource
public int getSource ()
Gets the source for which the axis is defined.
Returns | |
---|---|
int |
The source. |
isFromSource
public boolean isFromSource (int source)
Determines whether the event is from the given source.
Parameters | |
---|---|
source |
int : The input source to check against. This can be a specific device type,
such as InputDevice.SOURCE_TOUCH_NAVIGATION , or a more generic device class,
such as InputDevice.SOURCE_CLASS_POINTER . |
Returns | |
---|---|
boolean |
Whether the event is from the given source. |
Annotations
Interfaces
- ActionMode.Callback
- ActionProvider.VisibilityListener
- Choreographer.FrameCallback
- CollapsibleActionView
- ContextMenu
- ContextMenu.ContextMenuInfo
- GestureDetector.OnContextClickListener
- GestureDetector.OnDoubleTapListener
- GestureDetector.OnGestureListener
- InputQueue.Callback
- KeyEvent.Callback
- LayoutInflater.Factory
- LayoutInflater.Factory2
- LayoutInflater.Filter
- Menu
- MenuItem
- MenuItem.OnActionExpandListener
- MenuItem.OnMenuItemClickListener
- PixelCopy.OnPixelCopyFinishedListener
- ScaleGestureDetector.OnScaleGestureListener
- SubMenu
- SurfaceHolder
- SurfaceHolder.Callback
- SurfaceHolder.Callback2
- TextureView.SurfaceTextureListener
- View.OnApplyWindowInsetsListener
- View.OnAttachStateChangeListener
- View.OnCapturedPointerListener
- View.OnClickListener
- View.OnContextClickListener
- View.OnCreateContextMenuListener
- View.OnDragListener
- View.OnFocusChangeListener
- View.OnGenericMotionListener
- View.OnHoverListener
- View.OnKeyListener
- View.OnLayoutChangeListener
- View.OnLongClickListener
- View.OnScrollChangeListener
- View.OnSystemUiVisibilityChangeListener
- View.OnTouchListener
- View.OnUnhandledKeyEventListener
- ViewGroup.OnHierarchyChangeListener
- ViewManager
- ViewParent
- ViewStub.OnInflateListener
- ViewTreeObserver.OnDrawListener
- ViewTreeObserver.OnGlobalFocusChangeListener
- ViewTreeObserver.OnGlobalLayoutListener
- ViewTreeObserver.OnPreDrawListener
- ViewTreeObserver.OnScrollChangedListener
- ViewTreeObserver.OnTouchModeChangeListener
- ViewTreeObserver.OnWindowAttachListener
- ViewTreeObserver.OnWindowFocusChangeListener
- Window.Callback
- Window.OnFrameMetricsAvailableListener
- Window.OnRestrictedCaptionAreaChangedListener
- WindowManager
Classes
- AbsSavedState
- ActionMode
- ActionMode.Callback2
- ActionProvider
- Choreographer
- ContextThemeWrapper
- Display
- Display.HdrCapabilities
- Display.Mode
- DisplayCutout
- DragAndDropPermissions
- DragEvent
- FocusFinder
- FrameMetrics
- FrameStats
- GestureDetector
- GestureDetector.SimpleOnGestureListener
- Gravity
- HapticFeedbackConstants
- InputDevice
- InputDevice.MotionRange
- InputEvent
- InputQueue
- KeyboardShortcutGroup
- KeyboardShortcutInfo
- KeyCharacterMap
- KeyCharacterMap.KeyData
- KeyEvent
- KeyEvent.DispatcherState
- LayoutInflater
- MenuInflater
- MotionEvent
- MotionEvent.PointerCoords
- MotionEvent.PointerProperties
- OrientationEventListener
- OrientationListener
- PixelCopy
- PointerIcon
- ScaleGestureDetector
- ScaleGestureDetector.SimpleOnScaleGestureListener
- SearchEvent
- SoundEffectConstants
- Surface
- SurfaceView
- TextureView
- TouchDelegate
- VelocityTracker
- View
- View.AccessibilityDelegate
- View.BaseSavedState
- View.DragShadowBuilder
- View.MeasureSpec
- ViewAnimationUtils
- ViewConfiguration
- ViewDebug
- ViewGroup
- ViewGroup.LayoutParams
- ViewGroup.MarginLayoutParams
- ViewGroupOverlay
- ViewOutlineProvider
- ViewOverlay
- ViewPropertyAnimator
- ViewStructure
- ViewStructure.HtmlInfo
- ViewStructure.HtmlInfo.Builder
- ViewStub
- ViewTreeObserver
- Window
- WindowAnimationFrameStats
- WindowContentFrameStats
- WindowId
- WindowId.FocusObserver
- WindowInsets
- WindowManager.LayoutParams
Enums
Exceptions