SplitAttributes


public final class SplitAttributes


Attributes that describe how the parent window (typically the activity task window) is split between the primary and secondary activity containers, including:

  • Split type — Categorizes the split and specifies the sizes of the primary and secondary activity containers relative to the parent bounds

  • Layout direction — Specifies whether the parent window is split vertically or horizontally and in which direction the primary and secondary containers are respectively positioned (left to right, right to left, top to bottom, and so forth)

  • Animation background color — The color of the background during animation of the split involving this SplitAttributes object if the animation requires a background

Attributes can be configured by:

Summary

Nested types

public final class SplitAttributes.Builder

Builder for creating an instance of SplitAttributes.

The layout direction of the primary and secondary activity containers.

public final class SplitAttributes.SplitType

The type of parent window split, which defines the proportion of the parent window occupied by the primary and secondary activity containers.

Public methods

boolean
equals(Object other)

Determines whether this object has the same split attributes as the compared object.

final @NonNull SplitAttributes.LayoutDirection

The layout direction attribute for the parent window split.

final @NonNull SplitAttributes.SplitType

The split type attribute.

int

Returns a hash code for this SplitAttributes object.

@NonNull String

A string representation of this SplitAttributes object.

Public methods

equals

public boolean equals(Object other)

Determines whether this object has the same split attributes as the compared object.

Parameters
Object other

The object to compare to this object.

Returns
boolean

True if the objects have the same split attributes, false otherwise.

getLayoutDirection

Added in 1.1.0
public final @NonNull SplitAttributes.LayoutDirection getLayoutDirection()

The layout direction attribute for the parent window split. The default is based on locale.

getSplitType

Added in 1.1.0
public final @NonNull SplitAttributes.SplitType getSplitType()

The split type attribute. Defaults to an equal split of the parent window for the primary and secondary containers.

hashCode

public int hashCode()

Returns a hash code for this SplitAttributes object.

Returns
int

The hash code for this object.

toString

public @NonNull String toString()

A string representation of this SplitAttributes object.

Returns
@NonNull String

The string representation of the object.