日期选择器样式在android

时间:2017-10-07 10:33:00

标签: android

日期选择器对话框在不同的应用程序中显示不同的样式 什么是解决方案? 我对这两个应用程序使用相同的代码...

 final Calendar calendar = Calendar.getInstance();

    DatePickerDialog.OnDateSetListener dob = new DatePickerDialog.OnDateSetListener() {
        @Override
        public void onDateSet(DatePicker v, int year, int month, int dayOfMonth) {

            calendar.set(Calendar.YEAR, year);
            calendar.set(Calendar.MONTH, month);
            calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);

        }};

    DatePickerDialog dialog = new DatePickerDialog(AddTask.this, dob, calendar.get(Calendar.YEAR),
            calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH));
    dialog.getDatePicker().setMinDate(new Date().getTime());
    dialog.show();

date picker dialog shows different style in different app..

0 个答案:

没有答案