EmbeddingAspectRatio
class EmbeddingAspectRatio
The aspect ratio of the parent window bound to allow embedding with the rule.
Summary
Public companion functions |
|
|---|---|
EmbeddingAspectRatio |
ratio(ratio: @FloatRange(from = 1.0, fromInclusive = false) Float)For max aspect ratio, when the aspect ratio is greater than this value, it means to disallow embedding. |
Public companion properties |
|
|---|---|
EmbeddingAspectRatio |
Gets the special |
EmbeddingAspectRatio |
Gets the special |
Public companion functions
ratio
fun ratio(ratio: @FloatRange(from = 1.0, fromInclusive = false) Float): EmbeddingAspectRatio
For max aspect ratio, when the aspect ratio is greater than this value, it means to disallow embedding.
For min aspect ratio, when the aspect ratio is smaller than this value, it means to disallow embedding.
Values smaller than or equal to 1 are invalid.
| Parameters | |
|---|---|
ratio: @FloatRange(from = 1.0, fromInclusive = false) Float |
the aspect ratio. |
| Returns | |
|---|---|
EmbeddingAspectRatio |
the |
| See also | |
|---|---|
ALWAYS_ALLOW |
for always allow embedding. |
ALWAYS_DISALLOW |
for always disallow embedding. |
Public companion properties
ALWAYS_ALLOW
val ALWAYS_ALLOW: EmbeddingAspectRatio
Gets the special EmbeddingAspectRatio to represent it always allows embedding.
An example use case is to set it on SplitRule.maxAspectRatioInLandscape if the app wants to always allow embedding as split when the parent window is in landscape.
ALWAYS_DISALLOW
val ALWAYS_DISALLOW: EmbeddingAspectRatio
Gets the special EmbeddingAspectRatio to represent it always disallows embedding.
An example use case is to set it on SplitRule.maxAspectRatioInPortrait if the app wants to disallow embedding as split when the parent window is in portrait.