java.lang.Object | |
↳ | android.view.ViewStructure |
Container for storing additional per-view data generated by View.onProvideStructure
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add to this view's child count.
| |||||||||||
Call when done populating a
ViewStructure returned by
asyncNewChild(int) .
| |||||||||||
Like
newChild(int) , but allows the caller to asynchronously populate the returned
child.
| |||||||||||
Return the child count as set by
setChildCount(int) .
| |||||||||||
Get extra data associated with this view structure; the returned Bundle is mutable,
allowing you to view and modify its contents.
| |||||||||||
Retrieve the last hint set by
setHint(CharSequence) .
| |||||||||||
Retrieve the last
setText(CharSequence) .
| |||||||||||
Retrieve the last selection end set by
setText(CharSequence, int, int) .
| |||||||||||
Retrieve the last selection start set by
setText(CharSequence, int, int) .
| |||||||||||
Returns true if
getExtras() has been used to create extra content.
| |||||||||||
Create a new child
ViewStructure in this view, putting into the list of
children at index.
| |||||||||||
Set the accessibility focused state of this view, as per
View.isAccessibilityFocused() .
| |||||||||||
Set the activated state of this view, as per
View.isActivated() .
| |||||||||||
Set an alpha transformation that is applied to this view, as per
View.getAlpha() .
| |||||||||||
Set the checkable state of this view, such as whether it implements the
Checkable interface.
| |||||||||||
Set the checked state of this view, such as
Checkable.isChecked() .
| |||||||||||
Set the number of children of this view, which defines the range of indices you can
use with
newChild(int) and asyncNewChild(int) .
| |||||||||||
Set the class name of the view, as per
View.getAccessibilityClassName() .
| |||||||||||
Set the clickable state of this view, as per
View.isClickable() .
| |||||||||||
Set the content description of the view, as per
View.getContentDescription() .
| |||||||||||
Set the context clickable state of this view, as per
View.isContextClickable() .
| |||||||||||
Set the basic dimensions of this view.
| |||||||||||
Set the visual elevation (shadow) of the view, as per
View.getZ() .
| |||||||||||
Set the enabled state of this view, as per
View.isEnabled() .
| |||||||||||
Set the focusable state of this view, as per
View.isFocusable() .
| |||||||||||
Set the focused state of this view, as per
View.isFocused() .
| |||||||||||
Set optional hint text associated with this view; this is for example the text that is
shown by an EditText when it is empty to indicate to the user the kind of text to input.
| |||||||||||
Set the identifier for this view.
| |||||||||||
Set the long clickable state of this view, as per
View.isLongClickable() .
| |||||||||||
Set the selected state of this view, as per
View.isSelected() .
| |||||||||||
Like
setText(CharSequence) but with an active selection
extending from selectionStart through selectionEnd.
| |||||||||||
Set the text that is associated with this view.
| |||||||||||
Set line information for test that was previously supplied through
setText(CharSequence) .
| |||||||||||
Explicitly set default global style information for text that was previously set with
setText(CharSequence) .
| |||||||||||
Set the transformation matrix associated with this view, as per
View.getMatrix() , or null if there is none.
| |||||||||||
Set the visibility state of this view, as per
View.getVisibility() .
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Add to this view's child count. This increases the current child count by
num children beyond what was last set by setChildCount(int)
or addChildCount(int)
. The index at which the new child starts in the child
array is returned.
num | The number of new children to add. |
---|
Call when done populating a ViewStructure
returned by
asyncNewChild(int)
.
Like newChild(int)
, but allows the caller to asynchronously populate the returned
child. It can transfer the returned ViewStructure
to another thread for it
to build its content (and children etc). Once done, some thread must call
asyncCommit()
to tell the containing ViewStructure
that the async
population is done.
ViewStructure
ready to be filled in.
Return the child count as set by setChildCount(int)
.
Get extra data associated with this view structure; the returned Bundle is mutable, allowing you to view and modify its contents. Keys placed in the Bundle should use an appropriate namespace prefix (such as com.google.MY_KEY) to avoid conflicts.
Retrieve the last hint set by setHint(CharSequence)
.
Retrieve the last setText(CharSequence)
.
Retrieve the last selection end set by setText(CharSequence, int, int)
.
Retrieve the last selection start set by setText(CharSequence, int, int)
.
Returns true if getExtras()
has been used to create extra content.
Create a new child ViewStructure
in this view, putting into the list of
children at index.
ViewStructure
ready to be filled in.
Set the accessibility focused state of this view, as per
View.isAccessibilityFocused()
.
Set the activated state of this view, as per View.isActivated()
.
Set an alpha transformation that is applied to this view, as per
View.getAlpha()
. Value ranges from 0
(completely transparent) to 1 (completely opaque); the default is 1, which means
no transformation.
Set the checkable state of this view, such as whether it implements the
Checkable
interface.
Set the checked state of this view, such as
Checkable.isChecked()
.
Set the number of children of this view, which defines the range of indices you can
use with newChild(int)
and asyncNewChild(int)
. Calling this method again
resets all of the child state of the view, removing any children that had previously
been added.
Set the class name of the view, as per
View.getAccessibilityClassName()
.
Set the clickable state of this view, as per View.isClickable()
.
Set the content description of the view, as per
View.getContentDescription()
.
Set the context clickable state of this view, as per
View.isContextClickable()
.
Set the basic dimensions of this view.
left | The view's left position, in pixels relative to its parent's left edge. |
---|---|
top | The view's top position, in pixels relative to its parent's top edge. |
scrollX | How much the view's x coordinate space has been scrolled, in pixels. |
scrollY | How much the view's y coordinate space has been scrolled, in pixels. |
width | The view's visible width, in pixels. This is the width visible on screen, not the total data width of a scrollable view. |
height | The view's visible height, in pixels. This is the height visible on screen, not the total data height of a scrollable view. |
Set the visual elevation (shadow) of the view, as per
View.getZ()
. Note this is not related
to the physical Z-ordering of this view relative to its other siblings (that is how
they overlap when drawing), it is only the visual representation for shadowing.
Set the enabled state of this view, as per View.isEnabled()
.
Set the focusable state of this view, as per View.isFocusable()
.
Set the focused state of this view, as per View.isFocused()
.
Set optional hint text associated with this view; this is for example the text that is shown by an EditText when it is empty to indicate to the user the kind of text to input.
Set the identifier for this view.
id | The view's identifier, as per View.getId() . |
---|---|
packageName | The package name of the view's identifier, or null if there is none. |
typeName | The type name of the view's identifier, or null if there is none. |
entryName | The entry name of the view's identifier, or null if there is none. |
Set the long clickable state of this view, as per
View.isLongClickable()
.
Set the selected state of this view, as per View.isSelected()
.
Like setText(CharSequence)
but with an active selection
extending from selectionStart through selectionEnd.
Set the text that is associated with this view. There is no selection associated with the text. The text may have style spans to supply additional display and semantic information.
Set line information for test that was previously supplied through
setText(CharSequence)
. This provides the line breaking of the text as it
is shown on screen. This function takes ownership of the provided arrays; you should
not make further modification to them.
charOffsets | The offset in to setText(CharSequence) where a line starts. |
---|---|
baselines | The baseline where the line is drawn on screen. |
Explicitly set default global style information for text that was previously set with
setText(CharSequence)
.
size | The size, in pixels, of the text. |
---|---|
fgColor | The foreground color, packed as 0xAARRGGBB. |
bgColor | The background color, packed as 0xAARRGGBB. |
style | Style flags, as defined by AssistStructure.ViewNode .
|
Set the transformation matrix associated with this view, as per
View.getMatrix()
, or null if there is none.
Set the visibility state of this view, as per
View.getVisibility()
.