android4.x与andriod2.x的datepicker差异比较大(图)

最近刚学习android开发,准备使用时间下拉选择空间,使用了datepicker空间,结果发现,在android4.X下面和在android2.x下面差距太大,去overstack找了下资料,看来只能考虑使用datepickerdialog了

 

 4.X版本下的截图


android4.x与andriod2.x的datepicker差异比较大(图)
 

2.X版本下的截图

 
android4.x与andriod2.x的datepicker差异比较大(图)
 

 

Is there a way to make the datepicker in android 4.0 look like the easy one on 2.x devices? I don't really wanna to use a button with a dialog, but that is absolutely enormous, i don't want the "calendar" thing. Thanks in advance

 

 

1、在apk》=11之后的版本中,有一个方法,调用可以部分解决,但是想完全解决是没有办法,因为都是平台提供的。

picker.setCalendarViewShown(false);

 

System components look depends on the platform. You may be able (or not) to influence things like colors, but not functionality (unless you implement your own logic or layout). So in general, answer to your question is "No".

 

 

你可能感兴趣的:(Datepicker)