SplitAttributes


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

  • Divider attributes — Specifies whether a divider is needed between the split containers and the properties of the divider, including the color, the width, whether the divider is draggable, etc.

Attributes can be configured by:

Summary

Nested types

Builder for creating an instance of SplitAttributes.

The layout direction of the primary and secondary activity containers.

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

Public constructors

SplitAttributes(
    splitType: SplitAttributes.SplitType,
    layoutDirection: SplitAttributes.LayoutDirection,
    animationBackground: EmbeddingAnimationBackground,
    dividerAttributes: DividerAttributes
)

Public functions

open operator Boolean
equals(other: Any?)

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

open Int

Returns a hash code for this SplitAttributes object.

open String

A string representation of this SplitAttributes object.

Public properties

EmbeddingAnimationBackground

The animation background to use during the animation of the split involving this SplitAttributes object if the animation requires a background.

DividerAttributes

The DividerAttributes for this split.

SplitAttributes.LayoutDirection

The layout direction of the parent window split.

SplitAttributes.SplitType

The split type attribute.

Public constructors

SplitAttributes

Added in 1.4.0-alpha05
SplitAttributes(
    splitType: SplitAttributes.SplitType = SPLIT_TYPE_EQUAL,
    layoutDirection: SplitAttributes.LayoutDirection = LOCALE,
    animationBackground: EmbeddingAnimationBackground = EmbeddingAnimationBackground.DEFAULT,
    dividerAttributes: DividerAttributes = DividerAttributes.NO_DIVIDER
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

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

Parameters
other: Any?

The object to compare to this object.

Returns
Boolean

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

hashCode

open fun hashCode(): Int

Returns a hash code for this SplitAttributes object.

Returns
Int

The hash code for this object.

toString

open fun toString(): String

A string representation of this SplitAttributes object.

Returns
String

The string representation of the object.

Public properties

animationBackground

Added in 1.4.0-alpha05
val animationBackgroundEmbeddingAnimationBackground

The animation background to use during the animation of the split involving this SplitAttributes object if the animation requires a background. The default is to use the current theme window background color.

dividerAttributes

Added in 1.4.0-alpha05
val dividerAttributesDividerAttributes

The DividerAttributes for this split. Defaults to DividerAttributes.NO_DIVIDER, which means no divider is requested.

layoutDirection

Added in 1.1.0
val layoutDirectionSplitAttributes.LayoutDirection

The layout direction of the parent window split. The default is based on locale value.

splitType

Added in 1.1.0
val splitTypeSplitAttributes.SplitType

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