SplitPlaceholderRule
class SplitPlaceholderRule : SplitRule
| kotlin.Any | |||
| ↳ | androidx.window.embedding.EmbeddingRule | ||
| ↳ | androidx.window.embedding.SplitRule | ||
| ↳ | androidx.window.embedding.SplitPlaceholderRule |
Configuration rules for split placeholders.
A placeholder activity is usually a mostly empty activity that temporarily occupies the secondary container of a split. The placeholder is intended to be replaced when another activity with content is launched in a dedicated SplitPairRule. The placeholder activity is then occluded by the newly launched activity. The placeholder can provide some optional features but must not host important UI elements exclusively, since the placeholder is not shown on some devices and screen configurations, such as devices with small screens.
Configuration rules can be added using RuleController.addRule or RuleController.setRules.
See Activity embedding for more information.
Summary
Nested types |
|---|
|
Builder for |
Public properties |
|
|---|---|
Set<ActivityFilter> |
Filters used to choose when to apply this rule. |
SplitRule.FinishBehavior |
Determines what happens with the primary container when all activities are finished in the associated placeholder container. |
Boolean |
Determines whether the placeholder will show on top in a smaller window size after it first appeared in a split with sufficient minimum width. |
Intent |
Intent to launch the placeholder activity. |
Inherited properties |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||
|
Public functions
Public properties
filters
val filters: Set<ActivityFilter>
Filters used to choose when to apply this rule. The rule may be used if any one of the provided filters matches.
finishPrimaryWithPlaceholder
val finishPrimaryWithPlaceholder: SplitRule.FinishBehavior
Determines what happens with the primary container when all activities are finished in the associated placeholder container.
Note that it is not valid to set SplitRule.FinishBehavior.NEVER
isSticky
val isSticky: Boolean
Determines whether the placeholder will show on top in a smaller window size after it first appeared in a split with sufficient minimum width.
placeholderIntent
val placeholderIntent: Intent
Intent to launch the placeholder activity.