我有一个timePicker
String mName = input.getText().toString();
if (input.getParent() != null)
((ViewGroup) input.getParent()).removeView(input);
if (layout.getParent() != null)
((ViewGroup) layout.getParent()).removeView(layout);
mAlertDialog.dismiss();
Calendar mcurrentTime = Calendar.getInstance();
int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);
int minute = mcurrentTime.get(Calendar.MINUTE);
TimePickerDialog mTimePicker;
mTimePicker = new TimePickerDialog(Chat.this, new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {
Toast.makeText(getApplicationContext(), "Make sure you have internet access at this time selected",
Toast.LENGTH_LONG).show();
}
}, hour, minute, true);// Yes 24 hour time
mTimePicker.setTitle("Select Time");
mTimePicker.show();
我希望在用户选择的时间执行一种方法。我怎样才能做到这一点。说我想在给定的时间更改Firebase中的特定数据,我该怎么做?请帮帮我