Android超炫日期日历控件:TimesSquare

时间:2023-03-10 02:24:28
Android超炫日期日历控件:TimesSquare

先看效果图:

Android超炫日期日历控件:TimesSquare

使用说明:

在布局文件里:

<com.squareup.timessquare.CalendarPickerView
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>

在Java代码中:

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);

源代码下载