How to display timepicker dialog when radiobutton is clicked?
I'm trying to display time picker dialog by using showDialog(1);
when radio button is clicked. But i cannot display if i write onclick event for radio button. How to solv this开发者_运维技巧 problem? Any help is appreciated and thanks in advance...
RadioButton r;
r.setOnCheckedChangeListener(listener){
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// add your dialog here
}
}
YOu follow the link to get to know about the date picker: http://www.androidpeople.com/android-datepicker-dialog-example
you just have to replace the button date to the radio button, note the id used in the button should be same as that in the radio button.
精彩评论