I am trying to create a material design application for previous versions of Android using Theme.AppCompat. I want to show lollipop DatePicker in this previous version, but now my DatePicker App on Android 4 devices looks like this .
The code:
Dialog call:
DatePickerDialog dialog = new DatePickerDialog(getActivity(),
new mDateSetListener(), mYear, mMonth, mDay);
dialog.show();
DatePicker Class:
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
class mDateSetListener implements DatePickerDialog.OnDateSetListener {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
int mYear = year;
int mMonth = monthOfYear;
int mDay = dayOfMonth;
}
}
Is it possible to show DatePicker Material Design Date in previous versions as I want?
thank.
Flayn source
share