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

评论列表优化 #13

Open
yisizhu520 opened this issue Jul 7, 2015 · 1 comment
Open

评论列表优化 #13

yisizhu520 opened this issue Jul 7, 2015 · 1 comment

Comments

@yisizhu520
Copy link

在学习您的源码的时候,看到您的博客里说的,评论布局里的RecycleView用了setIsRecyclable(false),不然复用会导致布局混乱。自己分析了一下,对代码进行了一点修改,解决了这个问题。看楼主的博客,受益匪浅,赞一个
[code=java]
if (commentator.getFloorNum() > 1) { //CommentListActivity的228行
//添加这句,当有楼层的子View复用没有楼层的子View时也会正常显示
holder.floors_parent.setVisibility(View.VISIBLE);
.....
} else {
holder.floors_parent.setVisibility(View.GONE);
}
//在FloorView的init方法里添加removeAllViews();方法清空需复用的楼层里的评论
public void init() {
if (null == datas.iterator())
return;
removeAllViews();
...
[/code]

@ZhaoKaiQiang
Copy link
Owner

you can push a commit ,i'll merge it

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

2 participants