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

更多相关文章

  1. Android基本布局-RelativeLayout
  2. 用HTML5开发Android应用程序
  3. android布局属性的介绍
  4. Android新手笔记—六大布局
  5. Android(安卓)之使用Android(安卓)Studio(AS)命令打release包
  6. android 入门xml布局文件
  7. [置顶] Android(安卓)使用Android(安卓)Studio + Gradle 或 命令
  8. android 入门xml布局文件
  9. 今天开始记录自学android的历程

随机推荐

  1. Android(安卓)Studio和Eclipse快捷键对比
  2. Android实现简单拨打电话功能
  3. 浅谈android的selector背景选择器
  4. Android(安卓)Intent实现页面跳转的方法
  5. Android(安卓)Handler机制之Message的发
  6. Android(安卓)布局之TableLayout
  7. Android中Activity启动模式详解
  8. android 屏幕方向切换 锁定方向
  9. Android中的几种网络请求方式详解
  10. Android评分控件RatingBar使用实例解析