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 to represent it always allows embedding.

EmbeddingAspectRatio

Gets the special EmbeddingAspectRatio to represent it always disallows embedding.

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public companion functions

ratio

Added in 1.1.0
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 EmbeddingAspectRatio representing the ratio.

See also
ALWAYS_ALLOW

for always allow embedding.

ALWAYS_DISALLOW

for always disallow embedding.

Public companion properties

ALWAYS_ALLOW

val ALWAYS_ALLOWEmbeddingAspectRatio

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_DISALLOWEmbeddingAspectRatio

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.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String