Back to project page GroupGoal.
The source code is released under:
GNU General Public License
If you think the Android project GroupGoal listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.cs121.groupgoal; // www .j a v a 2 s .c om import android.app.Dialog; import android.app.DialogFragment; import android.app.TimePickerDialog; import android.os.Bundle; import android.text.format.DateFormat; import java.util.Calendar; /** * Used for the pop-out time picker that is displayed when a user is posting a new goal * and entering relevant information. * */ public class TimePickerDialogFragment extends DialogFragment { private TimePickerDialog.OnTimeSetListener mTimeSetListener; public TimePickerDialogFragment() { } public TimePickerDialogFragment(TimePickerDialog.OnTimeSetListener callback) { mTimeSetListener = (TimePickerDialog.OnTimeSetListener) callback; } public Dialog onCreateDialog(Bundle savedInstanceState) { Calendar cal = Calendar.getInstance(); return new TimePickerDialog(getActivity(), mTimeSetListener, cal.get(Calendar.HOUR), cal.get(Calendar.MINUTE), DateFormat.is24HourFormat(getActivity())); } }