请如何删除以编程方式创建的日历对话框中显示的日,月和年。
代码:
final Calendar myCalendar = Calendar.getInstance();
final DatePickerDialog.OnDateSetListener date = new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
// TODO Auto-generated method stub
myCalendar.set(Calendar.YEAR, year);
myCalendar.set(Calendar.MONTH, monthOfYear);
myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
// updateLabel();
String myFormat = "MM,dd,yyyy"; //In which you need put here
SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);
selectdate.setText(sdf.format(myCalendar.getTime()));
}
};
截图:
我不想在我的应用中使用v = green部分。突出日历。谢谢