SplitRule
@ExperimentalWindowApi public class SplitRule extends EmbeddingRule
SplitPairRule |
Split configuration rules for activity pairs. |
SplitPlaceholderRule |
Configuration rules for split placeholders. |
Split configuration rules for activities that are launched to side in a split. Define the visual properties of the split. 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 int |
The layout direction for the split. |
final int |
The smallest value of the smallest possible width of the parent window in any rotation when the split should be used, in pixels. |
final int |
The smallest value of width of the parent window when the split should be used, in pixels. |
final float |
Defines what part of the width should be given to the primary activity. |
Public methods |
|
|---|---|
final boolean |
checkParentMetrics(WindowMetrics parentMetrics)Verifies if the provided parent bounds allow to show the split containers side by side. |
boolean |
|
int |
hashCode() |
Public fields
minSmallestWidth
public final int minSmallestWidth
The smallest value of the smallest possible width of the parent window in any rotation when the split should be used, in pixels. When the window size is smaller than requested here, activities in the secondary container will be stacked on top of the activities in the primary one, completely overlapping them. If not set, the system will default to splitting at sw600dp.
minWidth
public final int minWidth
The smallest value of width of the parent window when the split should be used, in pixels. When the window size is smaller than requested here, activities in the secondary container will be stacked on top of the activities in the primary one, completely overlapping them. If not set, the system will default to splitting at 600dp.
splitRatio
public final float splitRatio
Defines what part of the width should be given to the primary activity. Defaults to an equal width split.
Public methods
checkParentMetrics
public final boolean checkParentMetrics(WindowMetrics parentMetrics)
Verifies if the provided parent bounds allow to show the split containers side by side.