Added in API level 30

ExtraRenderingInfo


class ExtraRenderingInfo : Parcelable
kotlin.Any
   ↳ android.view.accessibility.AccessibilityNodeInfo.ExtraRenderingInfo

Class with information of a view useful to evaluate accessibility needs. Developers can refresh the node with the key EXTRA_DATA_RENDERING_INFO_KEY to fetch this information if it is available for this node.

Summary

Nested classes

The builder for ExtraRenderingInfo.

Inherited constants
Public methods
Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Float

Returns the opacity of the node if it is available, otherwise -1.

Int

Returns the background color of the node if it is a android.graphics.drawable.ColorDrawable.

Int

Returns the current color selected to paint the hint text if the node has hint text.

Size?

Gets the size object containing the height and the width of android.view.ViewGroup.LayoutParams if the node is a ViewGroup or a TextView, or null otherwise.

Int

Returns the current color selected to paint the link text if the node has link text.

Int

Returns the current color selected for primary text if the node has visible text.

Float

Gets the text size if the node is a TextView, or -1 otherwise.

Int

Gets the text size unit if the node is a TextView, or -1 otherwise.

Unit
writeToParcel(parcel: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<AccessibilityNodeInfo.ExtraRenderingInfo!>

Public methods

describeContents

Added in API level 37
fun describeContents(): Int

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.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

getAlpha

Added in API level 37
fun getAlpha(): Float

Returns the opacity of the node if it is available, otherwise -1.0f.

getBackgroundColor

Added in API level 37
fun getBackgroundColor(): Int

Returns the background color of the node if it is a android.graphics.drawable.ColorDrawable. If the color has not been set or is unavailable, zero (equivalent to Color#TRANSPARENT) will be returned.

getHintTextColor

Added in API level 37
fun getHintTextColor(): Int

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 Color#TRANSPARENT) will be returned.

getLayoutSize

Added in API level 30
fun getLayoutSize(): Size?

Gets the size object containing the height and the width of android.view.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.

Return
Size? a Size stores layout height and layout width of the view, or null otherwise. And the size value may be in pixels, android.view.ViewGroup.LayoutParams#MATCH_PARENT, or android.view.ViewGroup.LayoutParams#WRAP_CONTENT

getLinkTextColor

Added in API level 37
fun getLinkTextColor(): Int

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 Color#TRANSPARENT) will be returned.

getTextColor

Added in API level 37
fun getTextColor(): Int

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 Color#TRANSPARENT) will be returned.

getTextSizeInPx

Added in API level 30
fun getTextSizeInPx(): Float

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.

Return
Float the text size of a TextView, or -1 otherwise.

getTextSizeUnit

Added in API level 30
fun getTextSizeUnit(): Int

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.

Return
Int the text size unit which type is TypedValue.TYPE_DIMENSION of a TextView, or -1 otherwise.

writeToParcel

Added in API level 37
fun writeToParcel(
    parcel: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written.
This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following:
parcel Parcel: This value cannot be null.

Properties