我正在尝试实现日期选择器,但出现以下 lint 错误
Raw use of parameterized class 'MaterialDatePicker.Builder'
下面是我的材料日期选择器代码
MaterialDatePicker.Builder builder = MaterialDatePicker.Builder.datePicker();
builder.setTitleText("Select date range of publication");
// If you want to set theme here
//builder.setTheme(R.style.MaterialTheme);
MaterialDatePicker<Long> materialDatePicker = builder.build();
materialDatePicker.show(getParentFragmentManager(),"DATE_PICKER");
materialDatePicker.addOnPositiveButtonClickListener(selection -> {
etDatesToPublish.setText(materialDatePicker.getHeaderText());
});