如何在android时间选择器对话框中删除textview

时间:2017-08-10 06:28:28

标签: android timepicker

请有人帮我从android timepicker对话中删除texview。

这是我的timepicker功能。

text()

这是我用于时间戳对话的代码

2 个答案:

答案 0 :(得分:1)

试试这个

dialog.setTitle("");

完全

@Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        final Calendar c = Calendar.getInstance();
        int hour = c.get(Calendar.HOUR_OF_DAY);
        int minute = c.get(Calendar.MINUTE);
        int seconds = c.get(Calendar.SECOND);
        TimePickerDialog dialog = new TimePickerDialog(getActivity(), this, hour, minute,true);
        dialog.setTitle("");
        return dialog;
    }

答案 1 :(得分:0)

从代码中删除以下行;

  picker.setCurrentHour(c.get(Calendar.HOUR_OF_DAY));
  picker.setCurrentMinute(c.get(Calendar.MINUTE));