Java Code Examples for android.app.TimePickerDialog#requestWindowFeature()
The following examples show how to use
android.app.TimePickerDialog#requestWindowFeature() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OCM_ChildMenu.java From GLEXP-Team-onebillion with Apache License 2.0 | 6 votes |
void showPickTimeDialog (final TimePickerDialog.OnTimeSetListener listener) { final DatePickerDialog.OnDateSetListener dateListener = (DatePickerDialog.OnDateSetListener) listener; final Calendar calendar = Calendar.getInstance(); TimePickerDialog d = new TimePickerDialog(MainActivity.mainActivity, listener, calendar.get(Calendar.HOUR_OF_DAY), calendar.get(Calendar.MINUTE), DateFormat.is24HourFormat(MainActivity.mainActivity)); // d.setCancelable(false); d.setCanceledOnTouchOutside(false); // d.setButton(DatePickerDialog.BUTTON_NEGATIVE, "Back", new DialogInterface.OnClickListener() { @Override public void onClick (DialogInterface dialog, int which) { showPickDateDialog(dateListener, null); } }); // LinearLayout linearLayout = new LinearLayout(MainActivity.mainActivity.getApplicationContext()); d.requestWindowFeature(Window.FEATURE_NO_TITLE); d.setCustomTitle(linearLayout); // d.show(); }
Example 2
Source File: OBSetupMenu.java From GLEXP-Team-onebillion with Apache License 2.0 | 5 votes |
void showPickTimeDialog (final TimePickerDialog.OnTimeSetListener listener) { final DatePickerDialog.OnDateSetListener dateListener = (DatePickerDialog.OnDateSetListener) listener; final Calendar calendar = Calendar.getInstance(); TimePickerDialog d = new TimePickerDialog(MainActivity.mainActivity, listener, calendar.get(Calendar.HOUR_OF_DAY), calendar.get(Calendar.MINUTE), DateFormat.is24HourFormat(MainActivity.mainActivity)); // d.setCancelable(false); d.setCanceledOnTouchOutside(false); // d.setButton(DatePickerDialog.BUTTON_NEGATIVE, "Back", new DialogInterface.OnClickListener() { @Override public void onClick (DialogInterface dialog, int which) { if (screenType == ScreenType.SET_DATE_SCREEN) { showPickDateDialog(dateListener, null); } else { MainActivity.log("OBSetupMenu:showPickTimeDialog:cancelled!"); } } }); // LinearLayout linearLayout = new LinearLayout(MainActivity.mainActivity.getApplicationContext()); d.requestWindowFeature(Window.FEATURE_NO_TITLE); d.setCustomTitle(linearLayout); // d.show(); }