File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
app/src/main/java/com/android/myapplication Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,11 @@ protected void onCreate(Bundle savedInstanceState) {
51
51
private void initView () {
52
52
mManager = new CalendarManager (LocalDate .now (),
53
53
CalendarManager .State .MONTH ,
54
- LocalDate .now (),
55
- LocalDate .now ().plusYears (1 ));
54
+ LocalDate .now (),//默认这个月,如果LocalDate.now().minusYears(1));
55
+ LocalDate .now ().plusYears (1 ));//可以划之后一年
56
56
calendarView .init (mManager );
57
57
58
- calendarView .showChinaDay (true );
58
+ calendarView .showChinaDay (true );//显示农历
59
59
60
60
switchChinaDay .setChecked (true );
61
61
}
@@ -127,7 +127,8 @@ public void onClick(View v) {
127
127
}
128
128
});
129
129
}
130
-
130
+
131
+
131
132
private void initData () {
132
133
Calendar cal = Calendar .getInstance ();
133
134
// cal.set(Calendar.MONTH, 9);
@@ -155,6 +156,7 @@ private void initData() {
155
156
}
156
157
//设置数据显示
157
158
calendarView .setArrayData (json );
159
+ //刷新日期
158
160
calendarView .populateLayout ();
159
161
}
160
162
}
You can’t perform that action at this time.
0 commit comments