Getting The Material Design Timepicker - Android?
if i use TimePicker/TimePickerDialog in my app i'm getting timePickerMode='spinner' styled widget though what i'm looking for is timePickerMode='clock'. this is the style I've done
Solution 1:
As of late 2020, MaterialTimePicker
is in the beta version of the Material package.
Therefore you can add the following to your app Gradle:
dependencies { ...
implementation 'com.google.android.material:material:1.3.0-beta01'
}
And then use MaterialTimePicker
like so:
MaterialTimePicker materialTimePicker =new MaterialTimePicker.Builder()
.setTimeFormat(clockFormat)
.setHour(hour)
.setMinute(minute)
.build();
materialTimePicker.show(requireFragmentManager(), "fragment_tag");
Post a Comment for "Getting The Material Design Timepicker - Android?"