我怎么能显示传统日历?

时间:2017-11-04 15:41:12

标签: java android calendar

我想在我的应用程序中使用传统的(在材料设计之前)日历:计数器日历 我使用以下代码,这是输出 enter image description here

我的代码是:

public static class DatePickerFragment extends DialogFragment implements DatePickerDialog.OnDateSetListener
{


    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        // Use the current date as the default date in the picker
        final Calendar c = Calendar.getInstance();
        int year = c.get(Calendar.YEAR);
        int month = c.get(Calendar.MONTH);
        int day = c.get(Calendar.DAY_OF_MONTH);

        // Create a new instance of DatePickerDialog and return it
        return new DatePickerDialog(getActivity(), this, year, month, day);
    }


    public void onDateSet(DatePicker view, int year, int month, int day) {
        Log.e("Result is :", String.valueOf(year + month + day));
    }

我需要显示这个日历..我怎么样?

enter image description here

0 个答案:

没有答案