Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

日期列显示会少一列 #46

Open
Victor2018 opened this issue Aug 3, 2023 · 1 comment
Open

日期列显示会少一列 #46

Victor2018 opened this issue Aug 3, 2023 · 1 comment

Comments

@Victor2018
Copy link

for (int i = 0; i < 14; i++) {
DateInfo dateInfo = new DateInfo();
String date = DAY_UI_MONTH_DAY_FORMAT.format(calendar.getTime());
String week = WEEK_FORMAT.format(calendar.getTime());
dateInfo.setDate(date);
dateInfo.setWeek(week);
dateInfoList.add(dateInfo);
calendar.add(Calendar.DAY_OF_MONTH, 1);
}

你这个代码生成的数据使用14列的但是实际只显示了13列

@Victor2018
Copy link
Author

在你的ScrollablePanelAdapter中这里错误
@OverRide
public int getColumnCount() {
return dateInfoList.size();
}
应该改为
@OverRide
public int getColumnCount() {
return dateInfoList.size() + 1;
}
不然列会显示少一列

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant