List of usage examples for android.app DatePickerDialog getWindow
public @Nullable Window getWindow()
From source file:me.tipi.kiosk.ui.fragments.IdentityFragment.java
/** * Show dob dialog./*w ww .jav a2s . co m*/ */ private void showDobDialog() { DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), android.R.style.Theme_Holo_Light_Dialog, new DatePickerDialog.OnDateSetListener() { @Override public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { birthdayLayout.setError(null); Calendar calendar = Calendar.getInstance(); birthDayPickerView.setText( String.format(Locale.US, "%d - %d - %d", dayOfMonth, monthOfYear + 1, year)); calendar.set(year, monthOfYear, dayOfMonth); dob = calendar.getTime(); } }, 1985, 6, 15); DatePicker datePicker = datePickerDialog.getDatePicker(); datePickerDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); styleDatePicker(datePicker); datePickerDialog.show(); }