Last active
March 1, 2018 15:50
-
-
Save sharifulislam52/ce1a9f87386c3071791039c70768399f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static final int dialog_id = 0; | |
int hour_x, minute_x; | |
@Override | |
protected Dialog onCreateDialog(int id){ | |
if(id == dialog_id) { | |
return new TimePickerDialog(your_activity.this, getTime, hour_x, minute_x, true); | |
} | |
return null; | |
} | |
protected TimePickerDialog.OnTimeSetListener getTime = new TimePickerDialog.OnTimeSetListener() { | |
@Override | |
public void onTimeSet(TimePicker timePicker, int i, int i1) { | |
hour_x = i; | |
minute_x = i1; | |
// what want to do | |
} | |
}; | |
// dialog_id, your_activity, getTime, hour_x, minute_x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment