SplitAttributes.Builder

class SplitAttributes.Builder


Builder for creating an instance of SplitAttributes.

  • The default split type is an equal split between primary and secondary containers.

  • The default layout direction is based on locale.

  • The default animation background color is to use the current theme window background color.

Summary

Public constructors

Public functions

SplitAttributes

Builds a SplitAttributes instance with the attributes specified by setSplitType and setLayoutDirection.

SplitAttributes.Builder

Sets the split layout direction attribute.

SplitAttributes.Builder

Sets the split type attribute.

Public constructors

Builder

Added in 1.1.0
Builder()

Public functions

build

Added in 1.1.0
fun build(): SplitAttributes

Builds a SplitAttributes instance with the attributes specified by setSplitType and setLayoutDirection.

Returns
SplitAttributes

The new SplitAttributes instance.

setLayoutDirection

Added in 1.1.0
fun setLayoutDirection(layoutDirection: SplitAttributes.LayoutDirection): SplitAttributes.Builder

Sets the split layout direction attribute.

The default is based on locale.

Parameters
layoutDirection: SplitAttributes.LayoutDirection

The layout direction attribute.

Returns
SplitAttributes.Builder

This Builder.

setSplitType

Added in 1.1.0
fun setSplitType(type: SplitAttributes.SplitType): SplitAttributes.Builder

Sets the split type attribute.

The default is an equal split between primary and secondary containers.

Parameters
type: SplitAttributes.SplitType

The split type attribute.

Returns
SplitAttributes.Builder

This Builder.