CalendarView控件需要API11及以上使用
<CalendarView
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
CalendarView calendarView = (CalendarView) findViewById(R.id.calendar_view);
calendarView.setOnDateChangeListener(new OnDateChangeListener() {
@Override
public void onSelectedDayChange(CalendarView view, int year, int month, int dayOfMonth) {
String date = year + "年" + month + "月" + dayOfMonth + "日";
Toast.makeText(getApplicationContext(), date, Toast.LENGTH_LONG).show();
}
});
分享到:
相关推荐
android 日历控件 实现日历月份切换,给某一天加标记等功能 http://blog.csdn.net/idle_thing/article/details/17645831
仿酒店入住时间和结束时间控件,可以选择一段时间,列出多个日期进行选择
这是一个日历控件,里面提供能的功能很完善了,可以设置字体颜色,选中的背景色,设置事务。点击左右翻页等
android 日历控件源码.rar
Android 日历控件
android 日历控件 实现日历月份切换,给某一天加标记等功能 http://blog.csdn.net/idle_thing/article/details/17645831
android 日历控件,以后一定用得到
Android独立的日历控件,可用于选择日期
你还在为裤裤寻找漂亮的日历控件吗?这里有现成的,包你满意,稍微修改下就可以直接用了,当然可以根据你的需求自己添加你想要的跟好的功能
本人收集的android实现日历控件的源代码,希望能帮助大家。
挺好的 android 日历 测试demo 供初学者 学习
搜集了多个实用功能强大的日历控件
Android 平台可自定义化的日历控件,支持指定日期高亮,具有多种内建高亮模式,支持自定义高亮模式。
主要介绍了Android打造自己的日历控件,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下