2014-01-29 44 views
1

有沒有一種方法來定製Android中的DatePicker外觀? 我應該能夠瀏覽年份和月份 有沒有辦法做到這一點?定製datepicker的外觀

回答

0

你可以讓兩個單獨NumberPicker意見

NumberPicker yearPicker = (NumberPicker)findViewById(R.id.year_picker); 
NumberPicker monthPicker = (NumberPicker)findViewById(R.id.month_picker); 

yearPicker.setMinValue(2000); 
yearPicker.setMaxValue(2015); 

monthPicker.setMinValue(1); 
monthPicker.setMaxValue(12);