-
Notifications
You must be signed in to change notification settings - Fork 157
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
刷新数据后 每个标签之间的间距变大 #24
Comments
这里提交过一次。用最新的代码吧。还没更新版本
发自我的 iPhone
… 在 2019年1月24日,17:37,ZCGObject ***@***.***> 写道:
调用notifydatasetchanged后 标签的间距变得超大 , 并且没找到你在哪里有设置标签的间距
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
我运行的应该就是你最新的代码。我发现是因为这句代码 productHolder.des.addItemDecoration(new SpaceItemDecoration(dp2px(10))); 刷新时重复添加造成的。 你提交的最新的有处理这里吗? |
这块之前有人处理过,这个不能重复调用,你通过判断是不是空来需不需要调用该方法。
… 在 2019年1月25日,09:45,ZCGObject ***@***.***> 写道:
我运行的应该就是你最新的代码。我发现是因为这句代码 productHolder.des.addItemDecoration(new SpaceItemDecoration(dp2px(10))); 刷新时重复添加造成的。 你提交的最新的有处理这里吗?
我自己加了一个条件判断暂时解决了,你可以看一下会有什么问题吗?
public ArrayList spaceItemDecorations = new ArrayList<>();
if(position >= spaceItemDecorations.size()){
SpaceItemDecoration spaceItemDecoration = new SpaceItemDecoration(dp2px(10), dp2px(5));
spaceItemDecorations.add(spaceItemDecoration);
productHolder.des.addItemDecoration(spaceItemDecoration);
}
麻烦你了,谢谢!!!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#24 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AHbxxTxv-3KtnjV6q5_lkl9uJ5ng6WkVks5vGmHIgaJpZM4aQeXE>.
|
能告知一下怎么判断不为空的吗? |
你加我qq 1002326270 |
来了老弟 |
这个问题看demo 已经处理过了
发自我的 iPhone
… 在 2019年2月28日,09:26,mo ***@***.***> 写道:
来了老弟
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
demo没修复吧哥 |
Object tag = productHolder.des.getTag();
if (tag == null || (tag instanceof Boolean && (Boolean) tag == false)) {
productHolder.des.addItemDecoration(new SpaceItemDecoration(dp2px(10)));
productHolder.des.setTag(true);
} else {
//productHolder.des.setTag(false);
} |
看下vp_flow分支的代码
… 在 2019年2月28日,09:40,mo ***@***.***> 写道:
Object tag = productHolder.des.getTag();
if (tag == null || (tag instanceof Boolean && (Boolean) tag == false)) {
productHolder.des.addItemDecoration(new SpaceItemDecoration(dp2px(10)));
productHolder.des.setTag(true);
} else {
//productHolder.des.setTag(false);
}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#24 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AHbxxcLBW6LAD7udmMSSc-j83HEWQjXXks5vRzOLgaJpZM4aQeXE>.
|
调用notifydatasetchanged后 标签的间距变得超大 , 并且没找到你在哪里有设置标签的间距
The text was updated successfully, but these errors were encountered: