Loading src/com/android/deskclock/AlarmClockFragment.java +7 −3 Original line number Diff line number Diff line Loading @@ -241,7 +241,11 @@ public class AlarmClockFragment extends DeskClockFragment implements // Remove the CREATE_NEW extra now that we've processed it. intent.removeExtra(Alarms.ALARM_CREATE_NEW); TimePickerDialog tpd = (TimePickerDialog) getActivity().getFragmentManager(). // Make sure to use the child FragmentManager. We have to use that one for the // case where an intent comes in telling the activity to load the timepicker, // which means we have to use that one everywhere so that the fragment can get // correctly picked up here if it's open. TimePickerDialog tpd = (TimePickerDialog) getChildFragmentManager(). findFragmentByTag(AlarmUtils.FRAG_TAG_TIME_PICKER); if (tpd != null) { // The dialog is already open so we need to set the listener again. Loading Loading @@ -654,7 +658,7 @@ public class AlarmClockFragment extends DeskClockFragment implements @Override public void onClick(View view) { mSelectedAlarm = itemHolder.alarm; AlarmUtils.showTimeEditDialog(AlarmClockFragment.this.getFragmentManager(), AlarmUtils.showTimeEditDialog(getChildFragmentManager(), alarm, AlarmClockFragment.this, Alarms.get24HourMode(getActivity())); expandAlarm(itemHolder, true); itemHolder.alarmItem.post(mScrollRunnable); Loading Loading @@ -1255,7 +1259,7 @@ public class AlarmClockFragment extends DeskClockFragment implements // Set the "selected" alarm as null, and we'll create the new one when the timepicker // comes back. mSelectedAlarm = null; AlarmUtils.showTimeEditDialog(AlarmClockFragment.this.getChildFragmentManager(), AlarmUtils.showTimeEditDialog(getChildFragmentManager(), null, AlarmClockFragment.this, Alarms.get24HourMode(getActivity())); } Loading src/com/android/deskclock/AlarmUtils.java +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ public class AlarmUtils { } TimePickerDialog dialog = TimePickerDialog.newInstance(listener, hour, minutes, is24HourMode); dialog.setThemeDark(true); // Make sure the dialog isn't already added. manager.executePendingTransactions(); Loading Loading
src/com/android/deskclock/AlarmClockFragment.java +7 −3 Original line number Diff line number Diff line Loading @@ -241,7 +241,11 @@ public class AlarmClockFragment extends DeskClockFragment implements // Remove the CREATE_NEW extra now that we've processed it. intent.removeExtra(Alarms.ALARM_CREATE_NEW); TimePickerDialog tpd = (TimePickerDialog) getActivity().getFragmentManager(). // Make sure to use the child FragmentManager. We have to use that one for the // case where an intent comes in telling the activity to load the timepicker, // which means we have to use that one everywhere so that the fragment can get // correctly picked up here if it's open. TimePickerDialog tpd = (TimePickerDialog) getChildFragmentManager(). findFragmentByTag(AlarmUtils.FRAG_TAG_TIME_PICKER); if (tpd != null) { // The dialog is already open so we need to set the listener again. Loading Loading @@ -654,7 +658,7 @@ public class AlarmClockFragment extends DeskClockFragment implements @Override public void onClick(View view) { mSelectedAlarm = itemHolder.alarm; AlarmUtils.showTimeEditDialog(AlarmClockFragment.this.getFragmentManager(), AlarmUtils.showTimeEditDialog(getChildFragmentManager(), alarm, AlarmClockFragment.this, Alarms.get24HourMode(getActivity())); expandAlarm(itemHolder, true); itemHolder.alarmItem.post(mScrollRunnable); Loading Loading @@ -1255,7 +1259,7 @@ public class AlarmClockFragment extends DeskClockFragment implements // Set the "selected" alarm as null, and we'll create the new one when the timepicker // comes back. mSelectedAlarm = null; AlarmUtils.showTimeEditDialog(AlarmClockFragment.this.getChildFragmentManager(), AlarmUtils.showTimeEditDialog(getChildFragmentManager(), null, AlarmClockFragment.this, Alarms.get24HourMode(getActivity())); } Loading
src/com/android/deskclock/AlarmUtils.java +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ public class AlarmUtils { } TimePickerDialog dialog = TimePickerDialog.newInstance(listener, hour, minutes, is24HourMode); dialog.setThemeDark(true); // Make sure the dialog isn't already added. manager.executePendingTransactions(); Loading