UiScalingStrategy

fun interface UiScalingStrategy

A strategy that provides a factor to scale the UI with.

Functions

Link copied to clipboard
@FloatRange(from = 0.0, fromInclusive = false)
abstract fun getUiScalingFactor(context: Context): Float?

Returns an optional UI scaling factor for the given context. When a non-null value is returned, the value can be used to scale the UI accordingly. When null is returned, another strategy may be invoked, or the caller can choose to not scale the UI.

Inheritors

Link copied to clipboard