SizeMode.Responsive

class SizeMode.Responsive : SizeMode


The GlanceAppWidget provides a UI for a fixed set of sizes.

On Android 12 and later, the composable will be called once per size provided and the mapping from size to view will be sent to the system. The framework will then decide which view to display based on the current size of the App Widget (see android.widget.RemoteViews for details)

Before Android 12, the composable will be called for each size at which the app widget may be displayed (like for Exact). For each size, the best view will be chosen, which is the largest one that fits in the available space, or the smallest one if none fit.

Summary

Public constructors

Public functions

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

Public properties

Set<DpSize>

List of sizes to use, must not be empty.

Public constructors

Responsive

Added in 1.0.0
Responsive(sizes: Set<DpSize>)
Parameters
sizes: Set<DpSize>

List of sizes to use, must not be empty.

Public functions

equals

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

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

sizes

Added in 1.0.0
val sizesSet<DpSize>

List of sizes to use, must not be empty.