Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 917 Bytes

README.md

File metadata and controls

31 lines (26 loc) · 917 Bytes

日历选择器

基于 双向日期选择日历控件 开发。

示例

        CalendarPicker picker = new CalendarPicker(this);
        picker.setRangeDateOnFuture(3);
        if (singleTimeInMillis == 0) {
            singleTimeInMillis = System.currentTimeMillis();
        }
        picker.setSelectedDate(singleTimeInMillis);
        picker.setOnSingleDatePickListener(new OnSingleDatePickListener() {
            @Override
            public void onSingleDatePicked(@NonNull Date date) {
                singleTimeInMillis = date.getTime();
            }
        });
        picker.show();

配色

        CalendarPicker picker = new CalendarPicker(this);
        picker.setColorScheme(new ColorScheme()
                .daySelectBackgroundColor(0xFF0000FF)
                .dayStressTextColor(0xFF0000DD));
        picker.show();