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

关于剩余图片的计算,预加载 #11

Open
zizikoth opened this issue Dec 7, 2017 · 0 comments
Open

关于剩余图片的计算,预加载 #11

zizikoth opened this issue Dec 7, 2017 · 0 comments

Comments

@zizikoth
Copy link

zizikoth commented Dec 7, 2017

@OverRide
public void onSwiped(RecyclerView.ViewHolder viewHolder, Image.DataBean img, int direction) {
Logger.i("index = " + viewHolder.getLayoutPosition()); // index = 0
Logger.i("index = " + mData.indexOf(img)); // index = -1 mData是数据源
Logger.i("index = " + adapter.getItemCount()); // index = 10 正常
if (adapter.getItemCount() == 5) {
pageindex++;
getData();
snackbar.show((MainActivity) mContext);
}
}
如果是清空之后在加载图片的话体验不是很好
没有直接的点击事件
请原谅我直接下载了代码 进行修改

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