Added in API level 1

TimePicker


open class TimePicker : FrameLayout
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.FrameLayout
   ↳ android.widget.TimePicker

A widget for selecting the time of day, in either 24-hour or AM/PM mode.

For a dialog using this view, see android.app.TimePickerDialog. See the Pickers guide for more information.

Summary

Nested classes
abstract

The callback interface used to indicate the time has been adjusted.

XML attributes
android:timePickerMode Defines the look of the widget.
Inherited XML attributes
Inherited constants
Public constructors
TimePicker(context: Context!)

TimePicker(context: Context!, attrs: AttributeSet!)

TimePicker(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

TimePicker(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int)

Public methods
open Unit

open Unit

open CharSequence!

open Int

Describes the autofill type of this view, so an android.service.autofill.AutofillService can create the proper AutofillValue when autofilling the view.

open AutofillValue?

open Int

open Int

open Int

open Int

Returns the currently selected hour using 24-hour time.

open Int

Returns the currently selected minute.

open Boolean

open Boolean

open Unit
setCurrentHour(currentHour: Int)

Sets the currently selected hour using 24-hour time.

open Unit
setCurrentMinute(currentMinute: Int)

Sets the currently selected minute.

open Unit
setEnabled(enabled: Boolean)

open Unit
setHour(hour: Int)

Sets the currently selected hour using 24-hour time.

open Unit
setIs24HourView(is24HourView: Boolean)

Sets whether this widget displays time in 24-hour mode or 12-hour mode with an AM/PM picker.

open Unit
setMinute(minute: Int)

Sets the currently selected minute.

open Unit

Set the callback that indicates the time has been adjusted by the user.

open Boolean

Validates whether current input by the user is a valid time based on the locale.

Protected methods
open Unit

open Parcelable?

Inherited functions