We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我要实现瀑布流第二个item 距离同一排item偏下的样式,后面的布局以此中间向下。我添加了这个 public class SpaceItemDecoration extends RecyclerView.ItemDecoration{
private int space; public SpaceItemDecoration(int space) { this.space = space; } @Override public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { outRect.left=space; outRect.right=space; outRect.bottom=space; if(parent.getChildAdapterPosition(view)==1){ outRect.top=250; } }
上拉滚动时候new footerView的时候出现UI重排 界面变成一样齐的。滚到顶部在滚下来才会正常排列。不知道是什么原因感觉是recycleView重用机制导致找不到 position =1的位置导致重排?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我要实现瀑布流第二个item 距离同一排item偏下的样式,后面的布局以此中间向下。我添加了这个
public class SpaceItemDecoration extends RecyclerView.ItemDecoration{
上拉滚动时候new footerView的时候出现UI重排 界面变成一样齐的。滚到顶部在滚下来才会正常排列。不知道是什么原因感觉是recycleView重用机制导致找不到 position =1的位置导致重排?
The text was updated successfully, but these errors were encountered: