Renders a 2D Android view in 3D space by attaching it to a Node
with setRenderable(Renderable)
. By default, the size of the
view is 1 meter in the Scene
per 250dp in the layout. Use a ViewSizer
to control how the size of the view in the Scene
is calculated.
future = ViewRenderable.builder().setView(context, R.layout.view).build();
viewRenderable = future.thenAccept(...);
Nested Classes
Inherited Constants
Inherited Fields
Public Methods
static ViewRenderable.Builder | |
ViewRenderable.HorizontalAlignment | getHorizontalAlignment
()
Gets the
ViewRenderable.HorizontalAlignment
that controls where the ViewRenderable
is
positioned relative to the Node
it is attached to along the
x-axis. |
ViewSizer | |
ViewRenderable.VerticalAlignment | getVerticalAlignment
()
Gets the
ViewRenderable.VerticalAlignment
that controls where the ViewRenderable
is positioned
relative to the Node
it is attached to along the y-axis. |
View | |
ViewRenderable | |
void | setHorizontalAlignment
( ViewRenderable.HorizontalAlignment
horizontalAlignment)
Sets the
ViewRenderable.HorizontalAlignment
that controls where the ViewRenderable
is
positioned relative to the Node
it is attached to along the
x-axis. |
void | |
void | setVerticalAlignment
( ViewRenderable.VerticalAlignment
verticalAlignment)
Sets the
ViewRenderable.VerticalAlignment
that controls where the ViewRenderable
is positioned
relative to the Node
it is attached to along the y-axis. |
Inherited Methods
Public Methods
public static ViewRenderable.Builder builder ()
Constructs a ViewRenderable
public ViewRenderable.HorizontalAlignment getHorizontalAlignment ()
Gets the ViewRenderable.HorizontalAlignment
that controls where the ViewRenderable
is
positioned relative to the Node
it is attached to along the
x-axis. The default is CENTER
.
public ViewSizer getSizer ()
Gets the ViewSizer
that controls the size of this ViewRenderable
in the Scene
.
public ViewRenderable.VerticalAlignment getVerticalAlignment ()
Gets the ViewRenderable.VerticalAlignment
that controls where the ViewRenderable
is positioned
relative to the Node
it is attached to along the y-axis. The
default is BOTTOM
.
public View getView ()
The 2D Android View
that is rendered by this ViewRenderable
.
public ViewRenderable makeCopy ()
Creates a new instance of this ViewRenderable.
The new renderable will have unique copy of all mutable state. All materials referenced by the ViewRenderable will also be instanced. Immutable data will be shared between the instances. The new ViewRenderable will reference the same getFilamentEngine View as the original ViewRenderable.
public void setHorizontalAlignment ( ViewRenderable.HorizontalAlignment horizontalAlignment)
Sets the ViewRenderable.HorizontalAlignment
that controls where the ViewRenderable
is
positioned relative to the Node
it is attached to along the
x-axis. The default is CENTER
.
Parameters
public void setSizer ( ViewSizer viewSizer)
Sets the ViewSizer
that controls the size of this ViewRenderable
in the Scene
.
Parameters
public void setVerticalAlignment ( ViewRenderable.VerticalAlignment verticalAlignment)
Sets the ViewRenderable.VerticalAlignment
that controls where the ViewRenderable
is positioned
relative to the Node
it is attached to along the y-axis. The
default is BOTTOM
.