CalendarListview

介绍:

CalendarListview 提供了在日历视图中选择一个日期的简单方法

运行效果:

使用说明:

在xml中声明一个DayPickerView

<com.andexert.calendarlistview.library.DayPickerView
       android:id="@+id/pickerView"
       xmlns:calendar="http://schemas.android.com/apk/res-auto"
       android:layout_width="match_parent"
       android:layout_height="match_parent"/>

Next, you have to implementDatePickerControllerin your Activity or your Fragment. You will have to setgetMaxYearandonDayOfMonthSelected. The first one is the max year between the current one and this maxYear. The second one is called every time user selects a new date.

接下来你需要在你的activity或者fragment中实现DatePickerController:

@Override
public int getMaxYear()
{
    return 2015;
}
@Override
public void onDayOfMonthSelected(int year, int month, int day)
{
    Log.e("Day Selected", day + " / " + month + " / " + year);
}
已下载
0