For some reason, I have two titles in my DatePickerDialog.
How can I get rid of the white title at the top? This is the code I use to create the Dialog:
datePickerDialog = new DatePickerDialog(ProfileActivity.this, this, year, month, day);
datePickerDialog.getDatePicker().updateDate(year, month - 1, day);
datePickerDialog.show();
datePickerDialog.setTitle("");
I found that for myself:
datePickerDialog.getDatePicker().setMaxDate(c.getTimeInMillis());
and probably for you:
datePickerDialog.getDatePicker().updateDate(year, month - 1, day);
is the culprit. If you leave that line out, you won't have a title.
I'm looking into setting a specific theme tosolve the issue.
-- UPDATE --
Make sure you call .setTitle("");
AFTER you call .getDatePicker().x()
. Otherwise it will not work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With