API reference

VolumetricWindowLayoutParams Class

Extends Parcelable
VolumetricWindowLayoutParams is the VolumetricWindow equivalent of WindowManager.LayoutParams⁠.
Note that these attributes are hints to layout engines and policies. Whether a hint is ignored, or how it is applied can depend on the context, including possible alternative layout engines and styles.
Positioning involves two windows: the "poseable" window (also called the target window) the window being positioned, such as a child window and the "reference" window it is positioned relative to, such as the parent window.
VolumetricGravity is used in pairs to anchor the poseable window to the reference window: "attachFrom" selects a point on the poseable window, and "attachTo" selects the point on the reference window that it is aligned to.
VolumetricGravity identifies a point on a cuboid, selecting the center, a corner, or the center of an edge. By identifying a point on a target window and a point on a reference window, the target window can be posed so the two points are colocated.
The computed poseable position can be combined with additional adjustments to its location, orientation, or both, after the VolumetricGravity is applied (such as to apply a translation or rotation adjustment to the poseable).
VolumetricGravity values can be combined using the | operator. For example, to push the poseable cuboid to the bottom-left of its reference, use GRAVITY_BOTTOM | GRAVITY_START. (Note the use of GRAVITY_START and GRAVITY_END instead of left and right for consistent positions when supporting either left-to-right or right-to-left languages.)

Static Fields

CREATOR : final Creator< VolumetricWindowLayoutParams >
Parcelable.Creator⁠ that reconstructs instances from a Parcel⁠.
Signature
final Creator<VolumetricWindowLayoutParams> metavr.app.volumetricwindow.VolumetricWindowLayoutParams.CREATOR
GRAVITY_BOTTOM : final long
Selects a point at the bottom of the cuboid, affecting the y coordinate only.
Signature
final long metavr.app.volumetricwindow.VolumetricWindowLayoutParams.GRAVITY_BOTTOM
GRAVITY_CENTER : final long
Selects a point at the center of the cuboid, in x, y, and z coordinates.
Signature
final long metavr.app.volumetricwindow.VolumetricWindowLayoutParams.GRAVITY_CENTER
GRAVITY_CENTER_HORIZONTAL : final long
Selects a point at the horizontal center of the cuboid, affecting the x coordinate only.
Signature
final long metavr.app.volumetricwindow.VolumetricWindowLayoutParams.GRAVITY_CENTER_HORIZONTAL
GRAVITY_CENTER_VERTICAL : final long
Selects a point at the vertical center of the cuboid, affecting the y coordinate only.
Signature
final long metavr.app.volumetricwindow.VolumetricWindowLayoutParams.GRAVITY_CENTER_VERTICAL
GRAVITY_END : final long
Selects a point at the horizontal "end" of the cuboid, affecting the x coordinate only.
When used in a left-to-right locale, this is the right. When used in a right-to-left locale, this is the left.
Signature
final long metavr.app.volumetricwindow.VolumetricWindowLayoutParams.GRAVITY_END
GRAVITY_NONE : final long
Indicates that no gravity is specified.
Signature
final long metavr.app.volumetricwindow.VolumetricWindowLayoutParams.GRAVITY_NONE
GRAVITY_START : final long
Selects a point at the horizontal "start" of the cuboid, affecting the x coordinate only.
When used in a left-to-right locale, this is the left. When used in a right-to-left locale, this is the right.
Signature
final long metavr.app.volumetricwindow.VolumetricWindowLayoutParams.GRAVITY_START
GRAVITY_TOP : final long
Selects a point at the top of the cuboid, affecting the y coordinate only.
Signature
final long metavr.app.volumetricwindow.VolumetricWindowLayoutParams.GRAVITY_TOP

Methods

describeContents ()
Describes the special objects contained in this parcelable; always 0.
Signature
int metavr.app.volumetricwindow.VolumetricWindowLayoutParams.describeContents()
Returns
int
equals ( o )
Indicates whether another object is equal to this one by value.
Signature
boolean metavr.app.volumetricwindow.VolumetricWindowLayoutParams.equals(Object o)
Parameters
o: Object
Returns
boolean
getTranslationOverride ()
The position of the center of the child window relative to the center of a 2D parent window, in Android Window coordinates (density-independent pixels, aka dp).
Signature
Point metavr.app.volumetricwindow.VolumetricWindowLayoutParams.getTranslationOverride()
Returns
Point
hashCode ()
Returns a hash code consistent with equals(Object).
Signature
int metavr.app.volumetricwindow.VolumetricWindowLayoutParams.hashCode()
Returns
int
toString ()
Returns a debug string representation of this object.
Signature
String metavr.app.volumetricwindow.VolumetricWindowLayoutParams.toString()
Returns
String
writeToParcel ( dest , flags )
Flattens this object into the given Parcel⁠.
Signature
void metavr.app.volumetricwindow.VolumetricWindowLayoutParams.writeToParcel(Parcel dest, int flags)
Parameters
dest: Parcel
flags: int
Returns
void

Inner Classes

Builder Class

Constructors

Builder ()
Creates a new Builder.
Signature
metavr.app.volumetricwindow.VolumetricWindowLayoutParams.Builder.Builder()

Methods

build ()
Signature
VolumetricWindowLayoutParams metavr.app.volumetricwindow.VolumetricWindowLayoutParams.Builder.build()
Returns
VolumetricWindowLayoutParams
setAttachFrom ( value )
Selects the point on the poseable (target) window used for gravity attachment.
Signature
Builder metavr.app.volumetricwindow.VolumetricWindowLayoutParams.Builder.setAttachFrom(long value)
Parameters
value: long  Value is either
Returns
Builder
setAttachTo ( value )
Selects the point on the reference window that the poseable window is aligned to.
Signature
Builder metavr.app.volumetricwindow.VolumetricWindowLayoutParams.Builder.setAttachTo(long value)
Parameters
value: long  Value is either
Returns
Builder
setTranslationAdjustment ( value )
Sets the per-axis translation adjustment applied after gravity.
Signature
Builder metavr.app.volumetricwindow.VolumetricWindowLayoutParams.Builder.setTranslationAdjustment(TranslationAdjustment value)
Parameters
Returns
Builder
setTranslationOverride ( value )
Sets the optional density-independent-pixel translation override applied after gravity.
Signature
Builder metavr.app.volumetricwindow.VolumetricWindowLayoutParams.Builder.setTranslationOverride(Point value)
Parameters
value: Point
Returns
Builder

TranslationAdjustment Class

Extends Parcelable
TranslationAdjustment is used in VolumetricWindowLayoutParams to convey translation adjustments in X, Y, and Z directions when positionally attaching a VolumetricWindow to a 2D or 3D object, such as to another VolumetricWindow.
Apply the selected constant as a positive value to move the target away from the reference object (adding some spatial distance between them). Alternatively, apply the constant as a negative value to move the target in the opposite direction.

Constructors

TranslationAdjustment ( x , y , z )
Creates a new TranslationAdjustment.
Signature
metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.TranslationAdjustment(int x, int y, int z)
Parameters
x: int  adjustment option to apply to the X axis Value is either
y: int  adjustment option to apply to the Y axis Value is either
z: int  adjustment option to apply to the Z axis

Static Fields

CREATOR : final Creator< VolumetricWindowLayoutPTranslationAdjustment >
Parcelable.Creator⁠ that reconstructs instances from a Parcel⁠.
Signature
final Creator<VolumetricWindowLayoutPTranslationAdjustment> metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.CREATOR
MOVE_CLOSE : final int
The target should move away from (if positive) or in toward (if negative) the reference object by the smallest amount (determined by the SpatialWindowManager).
Signature
final int metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.MOVE_CLOSE
MOVE_FAR : final int
The target should move by the largest amount (determined by the SpatialWindowManager).
Signature
final int metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.MOVE_FAR
MOVE_MID : final int
The target should move away from or in toward the reference object by a medium amount.
Signature
final int metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.MOVE_MID
MOVE_MID_CLOSE : final int
The target should move a little further than MOVE_CLOSE.
Signature
final int metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.MOVE_MID_CLOSE
MOVE_MID_FAR : final int
The target should move by more than the MOVE_MID amount.
Signature
final int metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.MOVE_MID_FAR
MOVE_NONE : final int
The objects should be coplanar in the indicated axis.
Signature
final int metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.MOVE_NONE

Methods

describeContents ()
Describes the special objects contained in this parcelable; always 0.
Signature
int metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.describeContents()
Returns
int
equals ( o )
Indicates whether another object is equal to this one by value.
Signature
boolean metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.equals(Object o)
Parameters
o: Object
Returns
boolean
hashCode ()
Returns a hash code consistent with equals(Object).
Signature
int metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.hashCode()
Returns
int
toString ()
Returns a debug string representation of this object.
Signature
String metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.toString()
Returns
String
writeToParcel ( dest , flags )
Flattens this object into the given Parcel⁠.
Signature
void metavr.app.volumetricwindow.VolumetricWindowLayoutParams.TranslationAdjustment.writeToParcel(Parcel dest, int flags)
Parameters
dest: Parcel
flags: int
Returns
void