SplitPairRule

@ExperimentalWindowApi public final class SplitPairRule extends EmbeddingRule, SplitRule

Object
   ↳ EmbeddingRule
     ↳ SplitRule
       ↳ SplitPairRule

Split configuration rules for activity pairs. Define when activities that were launched on top of each other should be shown side-by-side, and the visual properties of such splits. Can be set either statically via SplitController.Companion.initialize or at runtime via SplitController.registerRule. The rules can only be applied to activities that belong to the same application and are running in the same process. The rules are always applied only to activities that will be started after the rules were set.

Summary

Public fields

final boolean

If there is an existing split with the same primary container, indicates whether the existing secondary container on top and all activities in it should be destroyed when a new split is created using this rule.

final @NonNull Set<@NonNull SplitPairFilter>

Read-only filters used to choose when to apply this rule.

final boolean

When all activities are finished in the secondary container, the activity in the primary container that created the split should also be finished.

final boolean

When all activities are finished in the primary container, the activities in the secondary container in the split should also be finished.

Public constructors

SplitPairRule(
    Set<SplitPairFilter> filters,
    boolean finishPrimaryWithSecondary,
    boolean finishSecondaryWithPrimary,
    boolean clearTop,
    int minWidth,
    int minSmallestWidth,
    float splitRatio,
    @SplitRule.LayoutDir int layoutDir
)

Public methods

boolean
equals(Object other)
int

Inherited methods

From class SplitRule
final boolean

Verifies if the provided parent bounds allow to show the split containers side by side.

Public fields

clearTop

public final boolean clearTop

If there is an existing split with the same primary container, indicates whether the existing secondary container on top and all activities in it should be destroyed when a new split is created using this rule. Otherwise the new secondary will appear on top by default.

filters

public final @NonNull Set<@NonNull SplitPairFilterfilters

Read-only filters used to choose when to apply this rule.