Search in sources :

Example 6 with CalendarDay

use of com.prolificinteractive.materialcalendarview.CalendarDay in project GeekNews by codeestX.

the class CalendarActivity method initEventAndData.

@Override
protected void initEventAndData() {
    setToolBar(mToolbar, "选择日期");
    mCalender.state().edit().setFirstDayOfWeek(Calendar.WEDNESDAY).setMinimumDate(CalendarDay.from(2013, 5, 20)).setMaximumDate(CalendarDay.from(DateUtil.getCurrentYear(), DateUtil.getCurrentMonth(), DateUtil.getCurrentDay())).setCalendarDisplayMode(CalendarMode.MONTHS).commit();
    mCalender.setOnDateChangedListener(new OnDateSelectedListener() {

        @Override
        public void onDateSelected(@NonNull MaterialCalendarView widget, @NonNull CalendarDay date, boolean selected) {
            mDate = date;
        }
    });
}
Also used : OnDateSelectedListener(com.prolificinteractive.materialcalendarview.OnDateSelectedListener) MaterialCalendarView(com.prolificinteractive.materialcalendarview.MaterialCalendarView) CalendarDay(com.prolificinteractive.materialcalendarview.CalendarDay)

Aggregations

CalendarDay (com.prolificinteractive.materialcalendarview.CalendarDay)6 MaterialCalendarView (com.prolificinteractive.materialcalendarview.MaterialCalendarView)3 OnDateSelectedListener (com.prolificinteractive.materialcalendarview.OnDateSelectedListener)3 ArrayList (java.util.ArrayList)2 SuppressLint (android.annotation.SuppressLint)1 ActivityOptions (android.app.ActivityOptions)1 Intent (android.content.Intent)1 SwipeRefreshLayout (android.support.v4.widget.SwipeRefreshLayout)1 DefaultItemAnimator (android.support.v7.widget.DefaultItemAnimator)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 View (android.view.View)1 Window (android.view.Window)1 BindView (butterknife.BindView)1 DailyBeforeListBean (com.codeest.geeknews.model.bean.DailyBeforeListBean)1 DailyListBean (com.codeest.geeknews.model.bean.DailyListBean)1 ZhihuDetailActivity (com.codeest.geeknews.ui.zhihu.activity.ZhihuDetailActivity)1 DailyAdapter (com.codeest.geeknews.ui.zhihu.adapter.DailyAdapter)1 BroadDecorator (com.pangpangzhu.p2papp.test.calendardecorators.BroadDecorator)1 DefaultDecorator (com.pangpangzhu.p2papp.test.calendardecorators.DefaultDecorator)1