Class Overview
Contains methods to standard constants used in the UI for timeouts, sizes, and distances.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
Public Constructors
public
ViewConfiguration
()
Public Methods
Returns a configuration for the specified context. The configuration depends on
various parameters of the context, like the dimension of the display or the
density of the display.
Parameters
context
| The application context used to initialize the view configuration.
|
public
static
int
getDoubleTapTimeout
()
Returns
- the duration in milliseconds between the first tap's up event and
the second tap's down event for an interaction to be considered a
double-tap.
public
static
int
getEdgeSlop
()
This method was deprecated
in API level 3.
Use getScaledEdgeSlop()
instead.
Returns
- Inset in dips to look for touchable content when the user touches the edge of the
screen
public
static
int
getFadingEdgeLength
()
public
static
long
getGlobalActionKeyTimeout
()
This method is deprecated.
This timeout should not be used by applications
The amount of time a user needs to press the relevant key to bring up
the global actions dialog.
Returns
- how long a user needs to press the relevant key to bring up
the global actions dialog.
public
static
int
getJumpTapTimeout
()
Returns
- the duration in milliseconds we will wait to see if a touch event
is a jump tap. If the user does not move within this interval, it is
considered to be a tap.
public
static
int
getKeyRepeatDelay
()
Returns
- the time between successive key repeats in milliseconds.
public
static
int
getKeyRepeatTimeout
()
Returns
- the time before the first key repeat in milliseconds.
public
static
int
getLongPressTimeout
()
Returns
- the duration in milliseconds before a press turns into
a long press
public
static
int
getMaximumDrawingCacheSize
()
This method was deprecated
in API level 3.
Use getScaledMaximumDrawingCacheSize()
instead.
The maximum drawing cache size expressed in bytes.
Returns
- the maximum size of View's drawing cache expressed in bytes
public
static
int
getMaximumFlingVelocity
()
This method was deprecated
in API level 4.
Use getScaledMaximumFlingVelocity()
instead.
Returns
- Maximum velocity to initiate a fling, as measured in dips per second.
public
static
int
getMinimumFlingVelocity
()
This method was deprecated
in API level 3.
Use getScaledMinimumFlingVelocity()
instead.
Returns
- Minimum velocity to initiate a fling, as measured in dips per second.
public
static
int
getPressedStateDuration
()
Returns
- the duration in milliseconds of the pressed state in child
components.
public
int
getScaledDoubleTapSlop
()
Returns
- Distance in pixels between the first touch and second touch to still be
considered a double tap
public
int
getScaledEdgeSlop
()
Returns
- Inset in pixels to look for touchable content when the user touches the edge of the
screen
public
int
getScaledFadingEdgeLength
()
Returns
- the length of the fading edges in pixels
public
int
getScaledMaximumDrawingCacheSize
()
The maximum drawing cache size expressed in bytes.
Returns
- the maximum size of View's drawing cache expressed in bytes
public
int
getScaledMaximumFlingVelocity
()
Returns
- Maximum velocity to initiate a fling, as measured in pixels per second.
public
int
getScaledMinimumFlingVelocity
()
Returns
- Minimum velocity to initiate a fling, as measured in pixels per second.
public
int
getScaledOverflingDistance
()
Returns
- The maximum distance a View should overfling by when showing edge effects (in
pixels).
public
int
getScaledOverscrollDistance
()
Returns
- The maximum distance a View should overscroll by when showing edge effects (in
pixels).
public
int
getScaledPagingTouchSlop
()
Returns
- Distance in pixels a touch can wander before we think the user is scrolling a full
page
public
int
getScaledScrollBarSize
()
Returns
- The width of the horizontal scrollbar and the height of the vertical
scrollbar in pixels
public
int
getScaledTouchSlop
()
Returns
- Distance in pixels a touch can wander before we think the user is scrolling
public
int
getScaledWindowTouchSlop
()
Returns
- Distance in pixels a touch must be outside the bounds of a window for it
to be counted as outside the window for purposes of dismissing that window.
public
static
int
getScrollBarFadeDuration
()
Returns
- Duration of the fade when scrollbars fade away in milliseconds
public
static
int
getScrollBarSize
()
This method was deprecated
in API level 3.
Use getScaledScrollBarSize()
instead.
Returns
- The width of the horizontal scrollbar and the height of the vertical
scrollbar in dips
public
static
int
getScrollDefaultDelay
()
Returns
- Default delay before the scrollbars fade in milliseconds
public
static
float
getScrollFriction
()
The amount of friction applied to scrolls and flings.
Returns
- A scalar dimensionless value representing the coefficient of
friction.
public
static
int
getTapTimeout
()
Returns
- the duration in milliseconds we will wait to see if a touch event
is a tap or a scroll. If the user does not move within this interval, it is
considered to be a tap.
public
static
int
getTouchSlop
()
This method was deprecated
in API level 3.
Use getScaledTouchSlop()
instead.
Returns
- Distance in dips a touch can wander before we think the user is scrolling
public
static
int
getWindowTouchSlop
()
This method was deprecated
in API level 3.
Use getScaledWindowTouchSlop()
instead.
Returns
- Distance in dips a touch must be outside the bounds of a window for it
to be counted as outside the window for purposes of dismissing that
window.
public
static
long
getZoomControlsTimeout
()
The amount of time that the zoom controls should be
displayed on the screen expressed in milliseconds.
Returns
- the time the zoom controls should be visible expressed
in milliseconds.
public
boolean
hasPermanentMenuKey
()
Report if the device has a permanent menu key available to the user.
As of Android 3.0, devices may not have a permanent menu key available.
Apps should use the action bar to present menu options to users.
However, there are some apps where the action bar is inappropriate
or undesirable. This method may be used to detect if a menu key is present.
If not, applications should provide another on-screen affordance to access
functionality.
Returns
- true if a permanent menu key is present, false otherwise.