您的位置:首页 > 其它

DatePickerDialog:void onDateSet报错:current should be >= start and <= end

2016-03-09 04:45 543 查看

void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth);

方法里面可以设置当前显示的时间,后面三个参数。但是月份是不可以设置为12月的。查看源码才发现,只能是0-11。

public interface OnDateSetListener {

/**
* @param view The view associated with this listener.
* @param year The year that was set.
* @param monthOfYear The month that was set (0-11) for compatibility
*  with {@link java.util.Calendar}.
* @param dayOfMonth The day of the month that was set.
*/
void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  datepicker 界面