从DatePickerDialog中删除标题

Ale*_*lex 14 android android-alertdialog

出于某种原因,我在DatePickerDialog中有两个标题.

[截图](http://i.imgur.com/8rVEjlv.png)

如何摆脱顶部的白色标题?这是我用来创建Dialog的代码:

datePickerDialog = new DatePickerDialog(ProfileActivity.this, this, year, month, day);
datePickerDialog.getDatePicker().updateDate(year, month - 1, day);
datePickerDialog.show();
Run Code Online (Sandbox Code Playgroud)

Shr*_*rey 31

datePickerDialog.setTitle("");
Run Code Online (Sandbox Code Playgroud)


Spo*_*nic 16

我找到了自己: datePickerDialog.getDatePicker().setMaxDate(c.getTimeInMillis());

也许对你来说: datePickerDialog.getDatePicker().updateDate(year, month - 1, day);

是罪魁祸首.如果你离开那条线,你将没有标题.

我正在研究设定一个特定的主题来解决问题.

- 更新 -

确保在打电话.setTitle("");后打电话.getDatePicker().x().否则它将无法工作.