SplitAttributesCalculatorParams


public final class SplitAttributesCalculatorParams


The parameter container used to report the current device and window state in SplitController.setSplitAttributesCalculator and references the corresponding SplitRule by splitRuleTag if SplitPairRule.tag is specified.

Summary

Public methods

final boolean

Whether the parentWindowMetrics satisfies the dimensions and aspect ratios requirements specified in the SplitRule, which are:

final @NonNull SplitAttributes

The SplitRule.defaultSplitAttributes.

final @NonNull Configuration

The parent container's Configuration

final @NonNull WindowLayoutInfo

The parent container's WindowLayoutInfo

final @NonNull WindowMetrics

The parent container's WindowMetrics

final String

The tag of SplitRule to apply this SplitAttributes, which is null if the tag is not set.

@NonNull String

Public methods

areDefaultConstraintsSatisfied

Added in 1.2.0
public final boolean areDefaultConstraintsSatisfied()

Whether the parentWindowMetrics satisfies the dimensions and aspect ratios requirements specified in the SplitRule, which are:

getDefaultSplitAttributes

Added in 1.1.0
public final @NonNull SplitAttributes getDefaultSplitAttributes()

The SplitRule.defaultSplitAttributes. It could be from SplitRule Builder APIs (SplitPairRule.Builder.setDefaultSplitAttributes or SplitPlaceholderRule.Builder.setDefaultSplitAttributes) or from the splitRatio and splitLayoutDirection attributes from static rule definitions.

getParentConfiguration

Added in 1.1.0
public final @NonNull Configuration getParentConfiguration()

The parent container's Configuration

getParentWindowLayoutInfo

Added in 1.1.0
public final @NonNull WindowLayoutInfo getParentWindowLayoutInfo()

The parent container's WindowLayoutInfo

getParentWindowMetrics

Added in 1.1.0
public final @NonNull WindowMetrics getParentWindowMetrics()

The parent container's WindowMetrics

getSplitRuleTag

Added in 1.1.0
public final String getSplitRuleTag()

The tag of SplitRule to apply this SplitAttributes, which is null if the tag is not set.

See also
setTag
setTag

toString

public @NonNull String toString()