Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

DayNightStyle

public abstract @interface DayNightStyle
implements Annotation

androidx.car.widget.DayNightStyle


Specifies how the system UI should respond to day/night mode events.

Summary

Constants

int ALWAYS_DARK

Sets the color to be locked ot a dark variant during day and night.

int ALWAYS_LIGHT

Sets the color to be locked to a light variant during day and night.

int AUTO

Sets the foreground color to be automatically changed based on day/night mode, assuming the app content background is light during the day and dark during the night.

int AUTO_INVERSE

Sets the foreground color to be automatically changed based on day/night mode, assuming the app content background is dark during the day and light during the night.

Inherited methods

Constants

ALWAYS_DARK

public static final int ALWAYS_DARK

Sets the color to be locked ot a dark variant during day and night.

Constant Value: 3 (0x00000003)

ALWAYS_LIGHT

public static final int ALWAYS_LIGHT

Sets the color to be locked to a light variant during day and night.

Constant Value: 2 (0x00000002)

AUTO

public static final int AUTO

Sets the foreground color to be automatically changed based on day/night mode, assuming the app content background is light during the day and dark during the night.

This is the default behavior.

Constant Value: 0 (0x00000000)

AUTO_INVERSE

public static final int AUTO_INVERSE

Sets the foreground color to be automatically changed based on day/night mode, assuming the app content background is dark during the day and light during the night.

Constant Value: 1 (0x00000001)