我有DatePickerDialog,我想隐藏Dialog中的Year和Date字段,这是否可以隐藏特定字段?如果有可能那么我怎么能隐藏? 在此先感谢!!!
我的代码如下所示
split:a,b,c,d
答案 0 :(得分:0)
这对你有用: 这是一年隐藏
datePickerDialogObject.findViewById(Resources.getSystem().getIdentifier("year", "id", "android")).setVisibility(View.GONE);
这是为了从datepicker隐藏日期
datePickerDialogObject.findViewById(Resources.getSystem().getIdentifier("day", "id", "android")).setVisibility(View.GONE);