http://blog.csdn.net/wwj_748/article/details/38778631 使用该方法后,增加xml文件中DatePicker 添加 android:datePickerMode="spinner"
,TimePicker 添加 android:timePickerMode="spinner"
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <DatePicker android:id="@+id/datepicker" android:layout_width="match_parent" android:layout_height="wrap_content" android:calendarViewShown="false" android:datePickerMode="spinner"/> <TimePicker android:id="@+id/timepicker" android:layout_width="match_parent" android:layout_height="wrap_content" android:timePickerMode="spinner"/> </LinearLayout>
本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。
我来说两句