{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

TimePickerColors

@ExperimentalMaterial3Api
public final class TimePickerColors


Represents the colors used by a TimePicker in different states

Summary

Public constructors

TimePickerColors(
    @NonNull Color clockDialColor,
    @NonNull Color selectorColor,
    @NonNull Color containerColor,
    @NonNull Color periodSelectorBorderColor,
    @NonNull Color clockDialSelectedContentColor,
    @NonNull Color clockDialUnselectedContentColor,
    @NonNull Color periodSelectorSelectedContainerColor,
    @NonNull Color periodSelectorUnselectedContainerColor,
    @NonNull Color periodSelectorSelectedContentColor,
    @NonNull Color periodSelectorUnselectedContentColor,
    @NonNull Color timeSelectorSelectedContainerColor,
    @NonNull Color timeSelectorUnselectedContainerColor,
    @NonNull Color timeSelectorSelectedContentColor,
    @NonNull Color timeSelectorUnselectedContentColor
)

create an instance with arbitrary colors.

Public methods

final @NonNull TimePickerColors
copy(
    @NonNull Color clockDialColor,
    @NonNull Color selectorColor,
    @NonNull Color containerColor,
    @NonNull Color periodSelectorBorderColor,
    @NonNull Color clockDialSelectedContentColor,
    @NonNull Color clockDialUnselectedContentColor,
    @NonNull Color periodSelectorSelectedContainerColor,
    @NonNull Color periodSelectorUnselectedContainerColor,
    @NonNull Color periodSelectorSelectedContentColor,
    @NonNull Color periodSelectorUnselectedContentColor,
    @NonNull Color timeSelectorSelectedContainerColor,
    @NonNull Color timeSelectorUnselectedContainerColor,
    @NonNull Color timeSelectorSelectedContentColor,
    @NonNull Color timeSelectorUnselectedContentColor
)

Returns a copy of this TimePickerColors, optionally overriding some of the values.

boolean
equals(Object other)
final @NonNull Color

The color of the clock dial.

final @NonNull Color

the color of the numbers of the clock dial when they are selected or overlapping with the selector

final @NonNull Color

the color of the numbers of the clock dial when they are unselected

final @NonNull Color

The container color of the time picker.

final @NonNull Color

the color used for the border of the AM/PM toggle.

final @NonNull Color

the color used for the selected container of the AM/PM toggle

final @NonNull Color

color used for the selected content of the AM/PM toggle

final @NonNull Color

the color used for the unselected container of the AM/PM toggle

final @NonNull Color

color used for the unselected content of the AM/PM toggle

final @NonNull Color

The color of the clock dial selector.

final @NonNull Color

color used for the selected container of the display buttons to switch between hour and minutes

final @NonNull Color

color used for the selected content of the display buttons to switch between hour and minutes

final @NonNull Color

color used for the unselected container of the display buttons to switch between hour and minutes

final @NonNull Color

color used for the unselected content of the display buttons to switch between hour and minutes

int

Public constructors

TimePickerColors

public TimePickerColors(
    @NonNull Color clockDialColor,
    @NonNull Color selectorColor,
    @NonNull Color containerColor,
    @NonNull Color periodSelectorBorderColor,
    @NonNull Color clockDialSelectedContentColor,
    @NonNull Color clockDialUnselectedContentColor,
    @NonNull Color periodSelectorSelectedContainerColor,
    @NonNull Color periodSelectorUnselectedContainerColor,
    @NonNull Color periodSelectorSelectedContentColor,
    @NonNull Color periodSelectorUnselectedContentColor,
    @NonNull Color timeSelectorSelectedContainerColor,
    @NonNull Color timeSelectorUnselectedContainerColor,
    @NonNull Color timeSelectorSelectedContentColor,
    @NonNull Color timeSelectorUnselectedContentColor
)

create an instance with arbitrary colors. See TimePickerDefaults.colors for the default implementation that follows Material specifications.

Parameters
@NonNull Color clockDialColor

The color of the clock dial.

@NonNull Color selectorColor

The color of the clock dial selector.

@NonNull Color containerColor

The container color of the time picker.

@NonNull Color periodSelectorBorderColor

the color used for the border of the AM/PM toggle.

@NonNull Color clockDialSelectedContentColor

the color of the numbers of the clock dial when they are selected or overlapping with the selector

@NonNull Color clockDialUnselectedContentColor

the color of the numbers of the clock dial when they are unselected

@NonNull Color periodSelectorSelectedContainerColor

the color used for the selected container of the AM/PM toggle

@NonNull Color periodSelectorUnselectedContainerColor

the color used for the unselected container of the AM/PM toggle

@NonNull Color periodSelectorSelectedContentColor

color used for the selected content of the AM/PM toggle

@NonNull Color periodSelectorUnselectedContentColor

color used for the unselected content of the AM/PM toggle

@NonNull Color timeSelectorSelectedContainerColor

color used for the selected container of the display buttons to switch between hour and minutes

@NonNull Color timeSelectorUnselectedContainerColor

color used for the unselected container of the display buttons to switch between hour and minutes

@NonNull Color timeSelectorSelectedContentColor

color used for the selected content of the display buttons to switch between hour and minutes

@NonNull Color timeSelectorUnselectedContentColor

color used for the unselected content of the display buttons to switch between hour and minutes

Public methods

copy

public final @NonNull TimePickerColors copy(
    @NonNull Color clockDialColor,
    @NonNull Color selectorColor,
    @NonNull Color containerColor,
    @NonNull Color periodSelectorBorderColor,
    @NonNull Color clockDialSelectedContentColor,
    @NonNull Color clockDialUnselectedContentColor,
    @NonNull Color periodSelectorSelectedContainerColor,
    @NonNull Color periodSelectorUnselectedContainerColor,
    @NonNull Color periodSelectorSelectedContentColor,
    @NonNull Color periodSelectorUnselectedContentColor,
    @NonNull Color timeSelectorSelectedContainerColor,
    @NonNull Color timeSelectorUnselectedContainerColor,
    @NonNull Color timeSelectorSelectedContentColor,
    @NonNull Color timeSelectorUnselectedContentColor
)

Returns a copy of this TimePickerColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”

equals

public boolean equals(Object other)

getClockDialColor

public final @NonNull Color getClockDialColor()

The color of the clock dial.

getClockDialSelectedContentColor

public final @NonNull Color getClockDialSelectedContentColor()

the color of the numbers of the clock dial when they are selected or overlapping with the selector

getClockDialUnselectedContentColor

public final @NonNull Color getClockDialUnselectedContentColor()

the color of the numbers of the clock dial when they are unselected

getContainerColor

public final @NonNull Color getContainerColor()

The container color of the time picker.

getPeriodSelectorBorderColor

public final @NonNull Color getPeriodSelectorBorderColor()

the color used for the border of the AM/PM toggle.

getPeriodSelectorSelectedContainerColor

public final @NonNull Color getPeriodSelectorSelectedContainerColor()

the color used for the selected container of the AM/PM toggle

getPeriodSelectorSelectedContentColor

public final @NonNull Color getPeriodSelectorSelectedContentColor()

color used for the selected content of the AM/PM toggle

getPeriodSelectorUnselectedContainerColor

public final @NonNull Color getPeriodSelectorUnselectedContainerColor()

the color used for the unselected container of the AM/PM toggle

getPeriodSelectorUnselectedContentColor

public final @NonNull Color getPeriodSelectorUnselectedContentColor()

color used for the unselected content of the AM/PM toggle

getSelectorColor

public final @NonNull Color getSelectorColor()

The color of the clock dial selector.

getTimeSelectorSelectedContainerColor

public final @NonNull Color getTimeSelectorSelectedContainerColor()

color used for the selected container of the display buttons to switch between hour and minutes

getTimeSelectorSelectedContentColor

public final @NonNull Color getTimeSelectorSelectedContentColor()

color used for the selected content of the display buttons to switch between hour and minutes

getTimeSelectorUnselectedContainerColor

public final @NonNull Color getTimeSelectorUnselectedContainerColor()

color used for the unselected container of the display buttons to switch between hour and minutes

getTimeSelectorUnselectedContentColor

public final @NonNull Color getTimeSelectorUnselectedContentColor()

color used for the unselected content of the display buttons to switch between hour and minutes

hashCode

public int hashCode()