SplitPairRule
public final class SplitPairRule extends SplitRule
| java.lang.Object | |||
| ↳ | androidx.window.embedding.EmbeddingRule | ||
| ↳ | androidx.window.embedding.SplitRule | ||
| ↳ | androidx.window.embedding.SplitPairRule |
Split configuration rules for activity pairs. Define when activities that were launched on top should be placed adjacent to the one below, and the visual properties of such splits. Can be set either by RuleController.setRules or RuleController.addRule. The rules are always applied only to activities that will be started from the activity fills the whole parent task container or activity in the primary split after the rules were set.
Summary
Nested types |
|---|
public final class SplitPairRule.BuilderBuilder for |
Public methods |
|
|---|---|
boolean |
|
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> |
Filters used to choose when to apply this rule. |
final @NonNull SplitRule.FinishBehavior |
Determines what happens with the primary container when all activities are finished in the associated secondary container. |
final @NonNull SplitRule.FinishBehavior |
Determines what happens with the secondary container when all activities are finished in the associated primary container. |
int |
hashCode() |
@NonNull String |
toString() |
Inherited methods |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||
|
Public methods
getClearTop
public final boolean getClearTop()
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.
getFilters
public final @NonNull Set<@NonNull SplitPairFilter> getFilters()
Filters used to choose when to apply this rule. The rule may be used if any one of the provided filters matches.
getFinishPrimaryWithSecondary
public final @NonNull SplitRule.FinishBehavior getFinishPrimaryWithSecondary()
Determines what happens with the primary container when all activities are finished in the associated secondary container.
getFinishSecondaryWithPrimary
public final @NonNull SplitRule.FinishBehavior getFinishSecondaryWithPrimary()
Determines what happens with the secondary container when all activities are finished in the associated primary container.