static
ViewPropertyAnimatorCompat
|
animate(View view)
This method returns a ViewPropertyAnimator object, which can be used to animate
specific properties on this View.
|
static
boolean
|
canScrollHorizontally(View v, int direction)
Check if this view can be scrolled horizontally in a certain direction.
|
static
boolean
|
canScrollVertically(View v, int direction)
Check if this view can be scrolled vertically in a certain direction.
|
static
int
|
combineMeasuredStates(int curState, int newState)
Merge two states as returned by getMeasuredState(View) .
|
static
WindowInsetsCompat
|
dispatchApplyWindowInsets(View view, WindowInsetsCompat insets)
Request to apply the given window insets to this view or another view in its subtree.
|
static
void
|
dispatchFinishTemporaryDetach(View view)
Notify a view that its temporary detach has ended; the view is now reattached.
|
static
boolean
|
dispatchNestedFling(View view, float velocityX, float velocityY, boolean consumed)
Dispatch a fling to a nested scrolling parent.
|
static
boolean
|
dispatchNestedPreFling(View view, float velocityX, float velocityY)
Dispatch a fling to a nested scrolling parent before it is processed by this view.
|
static
boolean
|
dispatchNestedPreScroll(View view, int dx, int dy, int[] consumed, int[] offsetInWindow)
Dispatch one step of a nested scroll in progress before this view consumes any portion of it.
|
static
boolean
|
dispatchNestedScroll(View view, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int[] offsetInWindow)
Dispatch one step of a nested scroll in progress.
|
static
void
|
dispatchStartTemporaryDetach(View view)
Notify a view that it is being temporarily detached.
|
static
int
|
getAccessibilityLiveRegion(View view)
Gets the live region mode for the specified View.
|
static
AccessibilityNodeProviderCompat
|
getAccessibilityNodeProvider(View view)
Gets the provider for managing a virtual view hierarchy rooted at this View
and reported to AccessibilityService s
that explore the window content.
|
static
float
|
getAlpha(View view)
The opacity of the view.
|
static
ColorStateList
|
getBackgroundTintList(View view)
Return the tint applied to the background drawable, if specified.
|
static
PorterDuff.Mode
|
getBackgroundTintMode(View view)
Return the blending mode used to apply the tint to the background
drawable, if specified.
|
static
Rect
|
getClipBounds(View view)
Returns a copy of the current setClipBounds(View, Rect) .
|
static
float
|
getElevation(View view)
The base elevation of this view relative to its parent, in pixels.
|
static
boolean
|
getFitsSystemWindows(View v)
Returns true if this view should adapt to fit system window insets.
|
static
int
|
getImportantForAccessibility(View view)
Gets the mode for determining whether this View is important for accessibility
which is if it fires accessibility events and if it is reported to
accessibility services that query the screen.
|
static
int
|
getLabelFor(View view)
Gets the id of a view for which a given view serves as a label for
accessibility purposes.
|
static
int
|
getLayerType(View view)
Indicates what type of layer is currently associated with this view.
|
static
int
|
getLayoutDirection(View view)
Returns the resolved layout direction for this view.
|
static
Matrix
|
getMatrix(View view)
The transform matrix of this view, which is calculated based on the current
rotation, scale, and pivot properties.
|
static
int
|
getMeasuredHeightAndState(View view)
Return the full height measurement information for this view as computed
by the most recent call to measure(int, int) .
|
static
int
|
getMeasuredState(View view)
Return only the state bits of getMeasuredWidthAndState(View)
and getMeasuredHeightAndState(View) , combined into one integer.
|
static
int
|
getMeasuredWidthAndState(View view)
Return the full width measurement information for this view as computed
by the most recent call to measure(int, int) .
|
static
int
|
getMinimumHeight(View view)
Returns the minimum height of the view.
|
static
int
|
getMinimumWidth(View view)
Returns the minimum width of the view.
|
static
int
|
getOverScrollMode(View v)
Returns the over-scroll mode for this view.
|
static
int
|
getPaddingEnd(View view)
Returns the end padding of the specified view depending on its resolved layout direction.
|
static
int
|
getPaddingStart(View view)
Returns the start padding of the specified view depending on its resolved layout direction.
|
static
ViewParent
|
getParentForAccessibility(View view)
Gets the parent for accessibility purposes.
|
static
float
|
getPivotX(View view)
The x location of the point around which the view is
rotated and scaled .
|
static
float
|
getPivotY(View view)
The y location of the point around which the view is rotated and scaled .
|
static
float
|
getRotation(View view)
|
static
float
|
getRotationX(View view)
|
static
float
|
getRotationY(View view)
|
static
float
|
getScaleX(View view)
|
static
float
|
getScaleY(View view)
|
static
int
|
getScrollIndicators(View view)
Returns a bitmask representing the enabled scroll indicators.
|
static
String
|
getTransitionName(View view)
Returns the name of the View to be used to identify Views in Transitions.
|
static
float
|
getTranslationX(View view)
The horizontal location of this view relative to its left position.
|
static
float
|
getTranslationY(View view)
The vertical location of this view relative to its top position.
|
static
float
|
getTranslationZ(View view)
The depth location of this view relative to its elevation .
|
static
int
|
getWindowSystemUiVisibility(View view)
Returns the current system UI visibility that is currently set for the entire window.
|
static
float
|
getX(View view)
|
static
float
|
getY(View view)
|
static
float
|
getZ(View view)
The visual z position of this view, in pixels.
|
static
boolean
|
hasAccessibilityDelegate(View v)
Checks whether provided View has an accessibility delegate attached to it.
|
static
boolean
|
hasNestedScrollingParent(View view)
Returns true if this view has a nested scrolling parent.
|
static
boolean
|
hasOnClickListeners(View view)
Returns whether the provided view has an attached View.OnClickListener .
|
static
boolean
|
hasOverlappingRendering(View view)
Returns whether this View has content which overlaps.
|
static
boolean
|
hasTransientState(View view)
Indicates whether the view is currently tracking transient state that the
app should not need to concern itself with saving and restoring, but that
the framework should take special note to preserve when possible.
|
static
boolean
|
isAttachedToWindow(View view)
Returns true if the provided view is currently attached to a window.
|
static
boolean
|
isInLayout(View view)
Returns whether the view hierarchy is currently undergoing a layout pass.
|
static
boolean
|
isLaidOut(View view)
Returns true if view has been through at least one layout since it
was last attached to or detached from a window.
|
static
boolean
|
isLayoutDirectionResolved(View view)
Returns whether layout direction has been resolved.
|
static
boolean
|
isNestedScrollingEnabled(View view)
Returns true if nested scrolling is enabled for this view.
|
static
boolean
|
isOpaque(View view)
Indicates whether this View is opaque.
|
static
boolean
|
isPaddingRelative(View view)
Return if the padding as been set through relative values
View.setPaddingRelative(int, int, int, int) or thru
|
static
void
|
jumpDrawablesToCurrentState(View v)
On API 11 devices and above, call Drawable.jumpToCurrentState()
on all Drawable objects associated with this view.
|
static
void
|
offsetLeftAndRight(View view, int offset)
Offset this view's horizontal location by the specified amount of pixels.
|
static
void
|
offsetTopAndBottom(View view, int offset)
Offset this view's vertical location by the specified number of pixels.
|
static
WindowInsetsCompat
|
onApplyWindowInsets(View view, WindowInsetsCompat insets)
Called when the view should apply WindowInsetsCompat according to its internal policy.
|
static
void
|
onInitializeAccessibilityEvent(View v, AccessibilityEvent event)
Initializes an AccessibilityEvent with information about
this View which is the event source.
|
static
void
|
onInitializeAccessibilityNodeInfo(View v, AccessibilityNodeInfoCompat info)
Initializes an AccessibilityNodeInfoCompat with information
about this view.
|
static
void
|
onPopulateAccessibilityEvent(View v, AccessibilityEvent event)
Called from dispatchPopulateAccessibilityEvent(AccessibilityEvent)
giving a chance to this View to populate the accessibility event with its
text content.
|
static
boolean
|
performAccessibilityAction(View view, int action, Bundle arguments)
Performs the specified accessibility action on the view.
|
static
void
|
postInvalidateOnAnimation(View view, int left, int top, int right, int bottom)
Cause an invalidate of the specified area to happen on the next animation
time step, typically the next display frame.
|
static
void
|
postInvalidateOnAnimation(View view)
Cause an invalidate to happen on the next animation time step, typically the
next display frame.
|
static
void
|
postOnAnimation(View view, Runnable action)
Causes the Runnable to execute on the next animation time step.
|
static
void
|
postOnAnimationDelayed(View view, Runnable action, long delayMillis)
Causes the Runnable to execute on the next animation time step,
after the specified amount of time elapses.
|
static
void
|
requestApplyInsets(View view)
Ask that a new dispatch of View.onApplyWindowInsets(WindowInsets) be performed.
|
static
int
|
resolveSizeAndState(int size, int measureSpec, int childMeasuredState)
Utility to reconcile a desired size and state, with constraints imposed
by a MeasureSpec.
|
static
void
|
setAccessibilityDelegate(View v, AccessibilityDelegateCompat delegate)
Sets a delegate for implementing accessibility support via composition
(as opposed to inheritance).
|
static
void
|
setAccessibilityLiveRegion(View view, int mode)
Sets the live region mode for the specified view.
|
static
void
|
setActivated(View view, boolean activated)
Changes the activated state of this view.
|
static
void
|
setAlpha(View view, float value)
Sets the opacity of the view.
|
static
void
|
setBackgroundTintList(View view, ColorStateList tintList)
Applies a tint to the background drawable.
|
static
void
|
setBackgroundTintMode(View view, PorterDuff.Mode mode)
Specifies the blending mode used to apply the tint specified by
setBackgroundTintList(android.view.View, android.content.res.ColorStateList) to
the background drawable.
|
static
void
|
setChildrenDrawingOrderEnabled(ViewGroup viewGroup, boolean enabled)
Tells the ViewGroup whether to draw its children in the order defined by the method
ViewGroup.getChildDrawingOrder(int, int) .
|
static
void
|
setClipBounds(View view, Rect clipBounds)
Sets a rectangular area on this view to which the view will be clipped
when it is drawn.
|
static
void
|
setElevation(View view, float elevation)
Sets the base elevation of this view, in pixels.
|
static
void
|
setFitsSystemWindows(View view, boolean fitSystemWindows)
Sets whether or not this view should account for system screen decorations
such as the status bar and inset its content; that is, controlling whether
the default implementation of fitSystemWindows(Rect) will be
executed.
|
static
void
|
setHasTransientState(View view, boolean hasTransientState)
Set whether this view is currently tracking transient state that the
framework should attempt to preserve when possible.
|
static
void
|
setImportantForAccessibility(View view, int mode)
Sets how to determine whether this view is important for accessibility
which is if it fires accessibility events and if it is reported to
accessibility services that query the screen.
|
static
void
|
setLabelFor(View view, int labeledId)
Sets the id of a view for which a given view serves as a label for
accessibility purposes.
|
static
void
|
setLayerPaint(View view, Paint paint)
Updates the Paint object used with the current layer (used only if the current
layer type is not set to LAYER_TYPE_NONE ).
|
static
void
|
setLayerType(View view, int layerType, Paint paint)
Specifies the type of layer backing this view.
|
static
void
|
setLayoutDirection(View view, int layoutDirection)
Set the layout direction for this view.
|
static
void
|
setNestedScrollingEnabled(View view, boolean enabled)
Enable or disable nested scrolling for this view.
|
static
void
|
setOnApplyWindowInsetsListener(View v, OnApplyWindowInsetsListener listener)
Set an OnApplyWindowInsetsListener to take over the policy for applying
window insets to this view.
|
static
void
|
setOverScrollMode(View v, int overScrollMode)
Set the over-scroll mode for this view.
|
static
void
|
setPaddingRelative(View view, int start, int top, int end, int bottom)
Sets the relative padding.
|
static
void
|
setPivotX(View view, float value)
Sets the x location of the point around which the view is
rotated and scaled .
|
static
void
|
setPivotY(View view, float value)
Sets the y location of the point around which the view is
rotated and scaled .
|
static
void
|
setPointerIcon(View view, PointerIconCompat pointerIcon)
Set the pointer icon for the current view.
|
static
void
|
setRotation(View view, float value)
Sets the degrees that the view is rotated around the pivot point.
|
static
void
|
setRotationX(View view, float value)
Sets the degrees that the view is rotated around the horizontal axis through the pivot point.
|
static
void
|
setRotationY(View view, float value)
Sets the degrees that the view is rotated around the vertical axis through the pivot point.
|
static
void
|
setSaveFromParentEnabled(View v, boolean enabled)
Controls whether the entire hierarchy under this view will save its
state when a state saving traversal occurs from its parent.
|
static
void
|
setScaleX(View view, float value)
Sets the amount that the view is scaled in x around the pivot point, as a proportion of
the view's unscaled width.
|
static
void
|
setScaleY(View view, float value)
Sets the amount that the view is scaled in Y around the pivot point, as a proportion of
the view's unscaled width.
|
static
void
|
setScrollIndicators(View view, int indicators, int mask)
Sets the state of the scroll indicators specified by the mask.
|
static
void
|
setScrollIndicators(View view, int indicators)
Sets the state of all scroll indicators.
|
static
void
|
setTransitionName(View view, String transitionName)
Sets the name of the View to be used to identify Views in Transitions.
|
static
void
|
setTranslationX(View view, float value)
Sets the horizontal location of this view relative to its left position.
|
static
void
|
setTranslationY(View view, float value)
Sets the vertical location of this view relative to its top position.
|
static
void
|
setTranslationZ(View view, float translationZ)
Sets the depth location of this view relative to its elevation .
|
static
void
|
setX(View view, float value)
Sets the visual x position of this view, in pixels.
|
static
void
|
setY(View view, float value)
Sets the visual y position of this view, in pixels.
|
static
void
|
setZ(View view, float z)
Sets the visual z position of this view, in pixels.
|
static
boolean
|
startNestedScroll(View view, int axes)
Begin a nestable scroll operation along the given axes.
|
static
void
|
stopNestedScroll(View view)
Stop a nested scroll in progress.
|