FakeViewStructure

data class FakeViewStructure : ViewStructure
kotlin.Any
   ↳ android.view.ViewStructure
   ↳ androidx.ui.test.android.fake.FakeViewStructure

A fake implementation of ViewStructure to use in tests.

Summary

Public constructors

<init>(virtualId: Int = 0, packageName: String? = null, typeName: String? = null, entryName: String? = null, children: MutableList<FakeViewStructure> = mutableListOf(), bounds: Rect? = null, autofillId: AutofillId? = generateAutofillId(), autofillType: Int = View.AUTOFILL_TYPE_NONE, autofillHints: Array<out String> = arrayOf())

A fake implementation of ViewStructure to use in tests.

Public methods

Int
addChildCount(childCount: Int)

Unit

ViewStructure

Boolean
equals(other: Any?)

AutofillId?

Int

Bundle

CharSequence

CharSequence

Int

Int

Boolean

Int

FakeViewStructure
newChild(index: Int)

Builder

Unit

Unit

Unit

Unit
setAutofillHints(autofillHints: Array<out String>?)

Unit
setAutofillId(rootId: AutofillId, virtualId: Int)

Unit

Unit

Unit
setAutofillType(autofillType: Int)

Unit

Unit

Unit

Unit

Unit

Unit

Unit

Unit

Unit

Unit
setDimens(left: Int, top: Int, x: Int, y: Int, width: Int, height: Int)

Unit

Unit

Unit

Unit

Unit

Unit

Unit
setId(virtualId: Int, packageName: String?, typeName: String?, entryName: String?)

Unit

Unit

Unit

Unit

Unit

Unit

Unit
setText(p0: CharSequence?, p1: Int, p2: Int)

Unit

Unit
setTextStyle(p0: Float, p1: Int, p2: Int, p3: Int)

Unit

Unit

Unit

Properties

Rect?

The bounds (Dimensions) of the component represented by this ViewStructure.

MutableList<FakeViewStructure>

A list of ViewStructures that are children of the current ViewStructure.

String?

The entry name of the view's identifier, or null if there is none.

String?

The package name of the app (Used as an autofill heuristic).

String?

The type name of the view's identifier, or null if there is none.

Int

An ID that is unique for each viewStructure node in the viewStructure tree.

Public constructors

<init>

FakeViewStructure(
    virtualId: Int = 0,
    packageName: String? = null,
    typeName: String? = null,
    entryName: String? = null,
    children: MutableList<FakeViewStructure> = mutableListOf(),
    bounds: Rect? = null,
    autofillId: AutofillId? = generateAutofillId(),
    autofillType: Int = View.AUTOFILL_TYPE_NONE,
    autofillHints: Array<out String> = arrayOf())

A fake implementation of ViewStructure to use in tests.

Parameters
virtualId: Int = 0 An ID that is unique for each viewStructure node in the viewStructure tree.
packageName: String? = null The package name of the app (Used as an autofill heuristic).
typeName: String? = null The type name of the view's identifier, or null if there is none.
entryName: String? = null The entry name of the view's identifier, or null if there is none.
children: MutableList<FakeViewStructure> = mutableListOf() A list of ViewStructures that are children of the current ViewStructure.
bounds: Rect? = null The bounds (Dimensions) of the component represented by this ViewStructure.
autofillId: AutofillId? = generateAutofillId() The autofillId for the parent component. The same autofillId is used for other child components.
autofillType: Int = View.AUTOFILL_TYPE_NONE The data type. Can be one of the following: View.AUTOFILL_TYPE_DATE, View.AUTOFILL_TYPE_LIST, View.AUTOFILL_TYPE_TEXT, View.AUTOFILL_TYPE_TOGGLE or View.AUTOFILL_TYPE_NONE.
autofillHints: Array<out String> = arrayOf() The autofill hint. If this value not specified, we use heuristics to determine what data to use while performing autofill.

Public methods

addChildCount

fun addChildCount(childCount: Int): Int

asyncCommit

fun asyncCommit(): Unit

asyncNewChild

fun asyncNewChild(p0: Int): ViewStructure

equals

fun equals(other: Any?): Boolean

getAutofillId

fun getAutofillId(): AutofillId?

getChildCount

fun getChildCount(): Int

getExtras

fun getExtras(): Bundle

getHint

fun getHint(): CharSequence

getText

fun getText(): CharSequence

getTextSelectionEnd

fun getTextSelectionEnd(): Int

getTextSelectionStart

fun getTextSelectionStart(): Int

hasExtras

fun hasExtras(): Boolean

hashCode

fun hashCode(): Int

newChild

fun newChild(index: Int): FakeViewStructure

newHtmlInfoBuilder

fun newHtmlInfoBuilder(p0: String): Builder

setAccessibilityFocused

fun setAccessibilityFocused(p0: Boolean): Unit

setActivated

fun setActivated(p0: Boolean): Unit

setAlpha

fun setAlpha(p0: Float): Unit

setAutofillHints

fun setAutofillHints(autofillHints: Array<out String>?): Unit

setAutofillId

fun setAutofillId(
    rootId: AutofillId,
    virtualId: Int
): Unit

setAutofillId

fun setAutofillId(p0: AutofillId): Unit

setAutofillOptions

fun setAutofillOptions(p0: Array<out CharSequence>?): Unit

setAutofillType

fun setAutofillType(autofillType: Int): Unit

setAutofillValue

fun setAutofillValue(p0: AutofillValue?): Unit

setCheckable

fun setCheckable(p0: Boolean): Unit

setChecked

fun setChecked(p0: Boolean): Unit

setChildCount

fun setChildCount(p0: Int): Unit

setClassName

fun setClassName(p0: String?): Unit

setClickable

fun setClickable(p0: Boolean): Unit

setContentDescription

fun setContentDescription(p0: CharSequence?): Unit

setContextClickable

fun setContextClickable(p0: Boolean): Unit

setDataIsSensitive

fun setDataIsSensitive(p0: Boolean): Unit

setDimens

fun setDimens(
    left: Int,
    top: Int,
    x: Int,
    y: Int,
    width: Int,
    height: Int
): Unit

setElevation

fun setElevation(p0: Float): Unit

setEnabled

fun setEnabled(p0: Boolean): Unit

setFocusable

fun setFocusable(p0: Boolean): Unit

setFocused

fun setFocused(p0: Boolean): Unit

setHint

fun setHint(p0: CharSequence?): Unit

setHtmlInfo

fun setHtmlInfo(p0: HtmlInfo): Unit

setId

fun setId(
    virtualId: Int,
    packageName: String?,
    typeName: String?,
    entryName: String?
): Unit

setInputType

fun setInputType(p0: Int): Unit

setLocaleList

fun setLocaleList(p0: LocaleList?): Unit

setLongClickable

fun setLongClickable(p0: Boolean): Unit

setOpaque

fun setOpaque(p0: Boolean): Unit

setSelected

fun setSelected(p0: Boolean): Unit

setText

fun setText(p0: CharSequence?): Unit

setText

fun setText(
    p0: CharSequence?,
    p1: Int,
    p2: Int
): Unit

setTextLines

fun setTextLines(
    p0: IntArray?,
    p1: IntArray?
): Unit

setTextStyle

fun setTextStyle(
    p0: Float,
    p1: Int,
    p2: Int,
    p3: Int
): Unit

setTransformation

fun setTransformation(p0: Matrix?): Unit

setVisibility

fun setVisibility(p0: Int): Unit

setWebDomain

fun setWebDomain(p0: String?): Unit

Properties

bounds

var bounds: Rect?

The bounds (Dimensions) of the component represented by this ViewStructure.

children

var children: MutableList<FakeViewStructure>

A list of ViewStructures that are children of the current ViewStructure.

entryName

var entryName: String?

The entry name of the view's identifier, or null if there is none.

packageName

var packageName: String?

The package name of the app (Used as an autofill heuristic).

typeName

var typeName: String?

The type name of the view's identifier, or null if there is none.

virtualId

var virtualId: Int

An ID that is unique for each viewStructure node in the viewStructure tree.