AmbientLifecycleObserver.AmbientDetails

Added in 1.3.0

public final class AmbientLifecycleObserver.AmbientDetails


Details about ambient mode support on the current device, passed to AmbientLifecycleCallback.onEnterAmbient.

Summary

Public constructors

AmbientDetails(
    boolean burnInProtectionRequired,
    boolean deviceHasLowBitAmbient
)

Public methods

final boolean

whether the ambient layout must implement burn-in protection.

final boolean

whether this device has low-bit ambient mode.

@NonNull String

Public constructors

AmbientDetails

Added in 1.3.0
public AmbientDetails(
    boolean burnInProtectionRequired,
    boolean deviceHasLowBitAmbient
)
Parameters
boolean burnInProtectionRequired

whether the ambient layout must implement burn-in protection. When this property is set to true, views must be shifted around periodically in ambient mode. To ensure that content isn't shifted off the screen, avoid placing content within 10 pixels of the edge of the screen. Activities should also avoid solid white areas to prevent pixel burn-in. Both of these requirements only apply in ambient mode, and only when this property is set to true.

boolean deviceHasLowBitAmbient

whether this device has low-bit ambient mode. When this property is set to true, the screen supports fewer bits for each color in ambient mode. In this case, activities should disable anti-aliasing in ambient mode.

Public methods

getBurnInProtectionRequired

Added in 1.3.0
public final boolean getBurnInProtectionRequired()

whether the ambient layout must implement burn-in protection. When this property is set to true, views must be shifted around periodically in ambient mode. To ensure that content isn't shifted off the screen, avoid placing content within 10 pixels of the edge of the screen. Activities should also avoid solid white areas to prevent pixel burn-in. Both of these requirements only apply in ambient mode, and only when this property is set to true.

getDeviceHasLowBitAmbient

Added in 1.3.0
public final boolean getDeviceHasLowBitAmbient()

whether this device has low-bit ambient mode. When this property is set to true, the screen supports fewer bits for each color in ambient mode. In this case, activities should disable anti-aliasing in ambient mode.

toString

public @NonNull String toString()