原生日期选择器

@OnClick(R.id.timess)
    public void times(){
        new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {
            @Override
            public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
                textte.setText("您的出生日期是:"+String.format("%d-%d-%d",year,monthOfYear+1,dayOfMonth));

            }
        },2000,1,2).show();

    }

猜你喜欢

转载自blog.csdn.net/qq_41628942/article/details/82827470