AccessibilityNodeInfo.ExtraRenderingInfo
public
static
final
class
AccessibilityNodeInfo.ExtraRenderingInfo
extends Object
implements
Parcelable
| java.lang.Object | |
| ↳ | android.view.accessibility.AccessibilityNodeInfo.ExtraRenderingInfo |
Class with information of a view useful to evaluate accessibility needs. Developers can
refresh the node with the key AccessibilityNodeInfo.EXTRA_DATA_RENDERING_INFO_KEY to fetch this
information if it is available for this node.
See also:
Summary
Nested classes | |
|---|---|
class |
AccessibilityNodeInfo.ExtraRenderingInfo.Builder
The builder for ExtraRenderingInfo. |
Inherited constants |
|---|
Fields | |
|---|---|
public
static
final
Creator<AccessibilityNodeInfo.ExtraRenderingInfo> |
CREATOR
|
Public methods | |
|---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
float
|
getAlpha()
Returns the opacity of the node if it is available, otherwise -1.0f. |
int
|
getBackgroundColor()
Returns the background color of the node if it is a |
int
|
getHintTextColor()
Returns the current color selected to paint the hint text if the node has hint text. |
Size
|
getLayoutSize()
Gets the size object containing the height and the width of
|
int
|
getLinkTextColor()
Returns the current color selected to paint the link text if the node has link text. |
int
|
getTextColor()
Returns the current color selected for primary text if the node has visible text. |
float
|
getTextSizeInPx()
Gets the text size if the node is a |
int
|
getTextSizeUnit()
Gets the text size unit if the node is a |
void
|
writeToParcel(Parcel parcel, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
|---|---|
Fields
CREATOR
public static final Creator<AccessibilityNodeInfo.ExtraRenderingInfo> CREATOR
Public methods
describeContents
public int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(Parcel,int),
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR bit.
| Returns | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.
Value is either 0 or
|
getAlpha
public float getAlpha ()
Returns the opacity of the node if it is available, otherwise -1.0f.
| Returns | |
|---|---|
float |
|
See also:
getBackgroundColor
public int getBackgroundColor ()
Returns the background color of the node if it is a ColorDrawable. If the color has not been set or is
unavailable, zero (equivalent to ERROR(/Color#TRANSPARENT)) will be returned.
| Returns | |
|---|---|
int |
|
See also:
getHintTextColor
public int getHintTextColor ()
Returns the current color selected to paint the hint text if the node has hint text. If
the color has not been set or is unavailable, zero (equivalent to ERROR(/Color#TRANSPARENT)) will be returned.
| Returns | |
|---|---|
int |
|
See also:
getLayoutSize
public Size getLayoutSize ()
Gets the size object containing the height and the width of
ViewGroup.LayoutParams if the node is a ViewGroup or
a TextView, or null otherwise. Useful for some accessibility services to
understand whether the text is scalable and fits the view or not.
| Returns | |
|---|---|
Size |
a Size stores layout height and layout width of the view, or null
otherwise. And the size value may be in pixels,
ViewGroup.LayoutParams.MATCH_PARENT,
or ViewGroup.LayoutParams.WRAP_CONTENT |
getLinkTextColor
public int getLinkTextColor ()
Returns the current color selected to paint the link text if the node has link text. If
the color has not been set or is unavailable, zero (equivalent to ERROR(/Color#TRANSPARENT)) will be returned.
| Returns | |
|---|---|
int |
|
See also:
getTextColor
public int getTextColor ()
Returns the current color selected for primary text if the node has visible text. If the
color has not been set or is unavailable, zero (equivalent to ERROR(/Color#TRANSPARENT))
will be returned.
| Returns | |
|---|---|
int |
|
See also:
getTextSizeInPx
public float getTextSizeInPx ()
Gets the text size if the node is a TextView, or -1 otherwise. Useful for some
accessibility services to understand whether the text is scalable and fits the view or
not.
| Returns | |
|---|---|
float |
the text size of a TextView, or -1 otherwise. |
getTextSizeUnit
public int getTextSizeUnit ()
Gets the text size unit if the node is a TextView, or -1 otherwise.
Text size returned from getTextSizeInPx() in raw pixels may scale by factors and
convert from other units. Useful for some accessibility services to understand whether
the text is scalable and fits the view or not.
| Returns | |
|---|---|
int |
the text size unit which type is TypedValue.TYPE_DIMENSION of a
TextView, or -1 otherwise. |
See also:
writeToParcel
public void writeToParcel (Parcel parcel, int flags)
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
parcel |
Parcel: This value cannot be null. |
flags |
int: Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following:
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-03-26 UTC.