Stay organized with collections
Save and categorize content based on your preferences.
MaterialTimePicker.Builder
public
static
final
class
MaterialTimePicker.Builder
extends Object
java.lang.Object
|
↳ |
com.google.android.material.timepicker.MaterialTimePicker.Builder
|
Used to create MaterialTimePicker
instances.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
Builder
public Builder ()
Public methods
setHour
public MaterialTimePicker.Builder setHour (int hour)
Sets the hour with which to start the time picker.
Parameters |
hour |
int : The hour value is independent of the time format (setTimeFormat(int) ),
and should always be a number in the [0, 23] range.
|
setNegativeButtonText
public MaterialTimePicker.Builder setNegativeButtonText (int negativeButtonTextResId)
Sets the text used in the negative action button.
Parameters |
negativeButtonTextResId |
int |
setNegativeButtonText
public MaterialTimePicker.Builder setNegativeButtonText (CharSequence negativeButtonText)
Sets the text used in the negative action button.
Parameters |
negativeButtonText |
CharSequence |
setPositiveButtonText
public MaterialTimePicker.Builder setPositiveButtonText (CharSequence positiveButtonText)
Sets the text used in the positive action button.
Parameters |
positiveButtonText |
CharSequence |
setPositiveButtonText
public MaterialTimePicker.Builder setPositiveButtonText (int positiveButtonTextResId)
Sets the text used in the positive action button.
Parameters |
positiveButtonTextResId |
int |
setTheme
public MaterialTimePicker.Builder setTheme (int themeResId)
Sets the theme for the time picker.
Parameters |
themeResId |
int |
public MaterialTimePicker.Builder setTimeFormat (int format)
Sets the time format for the time picker.
Parameters |
format |
int : Either CLOCK_12H 12 hour format with an AM/PM toggle or CLOCK_24 24 hour format without toggle.
|
setTitleText
public MaterialTimePicker.Builder setTitleText (int titleTextResId)
Sets the text used to guide the user at the top of the picker.
Parameters |
titleTextResId |
int |
setTitleText
public MaterialTimePicker.Builder setTitleText (CharSequence charSequence)
Sets the text used to guide the user at the top of the picker.
Parameters |
charSequence |
CharSequence |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-01-25 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-01-25 UTC."],[],[]]