【发布时间】:2020-03-16 06:46:22
【问题描述】:
当对话框打开时,它会显示如图所示的空白区域(在 datePicker 的右侧),
我尝试设置布局参数
DatePickerDialog dialog = new DatePickerDialog(_context, this,
_birthYear, _month,
_day);
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
dialog.getDatePicker().setLayoutParams(params);
dialog.setCancelable(false);
dialog.getDatePicker().setSpinnersShown(false);
dialog.getDatePicker().setCalendarViewShown(true);
还是不行
有什么建议吗??
【问题讨论】: