Android日期日歷控件:TimesSquare
TimesSquare實現選擇日期日歷控件,可單選,多選,區間范圍和對話框四種方式。
將CalendarPicker View 引入你的布局XML文件中。
<com.squareup.timessquare.CalendarPickerView android:id="@+id/calendar_view" android:layout_width="match_parent" android:layout_height="match_parent" />
Calendar nextYear = Calendar.getInstance(); nextYear.add(Calendar.YEAR, 1);CalendarPickerView calendar = (CalendarPickerView) findViewById(R.id.calendar_view); Date today = new Date(); calendar.init(today, nextYear.getTime()) .withSelectedDate(today);</pre>
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!