private OnClickListener tvdateclick=new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Calendar mCalendar=Calendar.getInstance(Locale.CHINA);
int year=mCalendar.get(Calendar.YEAR);
int month=mCalendar.get(Calendar.MARCH);
int day=mCalendar.get(Calendar.DAY_OF_MONTH);
DatePickerDialog dpd=new DatePickerDialog(getActivity(), new OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int day) {
Log.i("TAG", "设置的年是:"+year+",设置的月是:"+(month+1)+",设置的天是"+day);
}
}, year, month, day);
dpd.show();
}
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Calendar mCalendar=Calendar.getInstance(Locale.CHINA);
int year=mCalendar.get(Calendar.YEAR);
int month=mCalendar.get(Calendar.MARCH);
int day=mCalendar.get(Calendar.DAY_OF_MONTH);
DatePickerDialog dpd=new DatePickerDialog(getActivity(), new OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int day) {
Log.i("TAG", "设置的年是:"+year+",设置的月是:"+(month+1)+",设置的天是"+day);
}
}, year, month, day);
dpd.show();
}
}; 微天下站长jsmen提供
www.imvbo.com