Android Time Picker Dialog Window – Coding Shiksha

Android Time Picker Dialog Window – Coding Shiksha

Welcome Folks I am back with another blog post. In this post I will be showing how to make a simple time picker dialog in android with the help of a library.

READ  Firebase Google Login in Android (Part-1) Demo

 

Include the Library

 

implementation 'com.jzxiang.pickerview:TimePickerDialog:1.0.1'

 

Demo

 

 

Configuration Code

 

mDialogAll = new TimePickerDialog.Builder()
                                    .setCallBack(this)
                                    .setCancelStringId("Cancel")
                                    .setSureStringId("Sure")
                                    .setTitleStringId("TimePicker")
                                    .setYearText("Year")
                                    .setMonthText("Month")
                                    .setDayText("Day")
                                    .setHourText("Hour")
                                    .setMinuteText("Minute")
                                    .setCyclic(false)
                                    .setMinMillseconds(System.currentTimeMillis())
                                    .setMaxMillseconds(System.currentTimeMillis() + tenYears)
                                    .setCurrentMillseconds(System.currentTimeMillis())
                                    .setThemeColor(getResources().getColor(R.color.timepicker_dialog_bg))
                                    .setType(Type.ALL)
                                    .setWheelItemTextNormalColor(getResources().getColor(R.color.timetimepicker_default_text_color))
                                    .setWheelItemTextSelectorColor(getResources().getColor(R.color.timepicker_toolbar_bg))
                                    .setWheelItemTextSize(12)
                                    .build();

 

Leave a Reply

Close Menu

Indian Desi Tools - Ultimate Tools Website

Demo Description


This will close in 20 seconds