标签:override touch ide tin cti 安卓 bool 转换 dial
@OnTouch(R.id.edt_wjzhcx_wjzh_ngrqq) public boolean setNgrqq(View view, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_UP) { final Calendar c = Calendar.getInstance(); new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() { @Override public void onDateSet(DatePicker datePicker, int i, int i1, int i2) { //转换下格式2017-9-26------>2017-09-26 edtWjzhcxWjzhNgrqq.setText(DateUtil.convertDate(i + "-" + (i1 + 1) + "-" + i2, "yyyy-MM-dd", "yyyy-MM-dd")); datePicker.setMaxDate(c.getTime().getTime());//设置最大日期 } }, c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH)).show(); return true; } return false; }
安卓DatePickerDialog使用Butternife的@onTouch 注解
标签:override touch ide tin cti 安卓 bool 转换 dial
原文地址:http://www.cnblogs.com/6324/p/7595748.html