ARR.s ARR.s - 6 months ago 50
Android Question

How to create TimePickerDialog android

I want to create TimePickerDialog and theme is sample dialog.

but I follow this link

result is not simple dialog

result is

enter image description here

I want

enter image description here

How to set this ?

and sorry My image is so large.

Answer Source

I have made one method for old TimePickerDialog...i have same situation like you..this is working great for me..

Use below method

    public void showHourPicker() {
            final Calendar myCalender = Calendar.getInstance();
            int hour = myCalender.get(Calendar.HOUR_OF_DAY);
            int minute = myCalender.get(Calendar.MINUTE);

            TimePickerDialog.OnTimeSetListener myTimeListener = new TimePickerDialog.OnTimeSetListener() {
                public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
                    if (view.isShown()) {
                        myCalender.set(Calendar.HOUR_OF_DAY, hourOfDay);
                        myCalender.set(Calendar.MINUTE, minute);

            TimePickerDialog timePickerDialog = new TimePickerDialog(getActivity(),, myTimeListener, hour, minute, true);
            timePickerDialog.setTitle("Choose hour:");

Hope this will help you...let me know if you need any help

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download