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

有一些建议,希望能够看到 #222

Closed
s949492225 opened this Issue Oct 19, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@s949492225
Copy link

s949492225 commented Oct 19, 2017

现如今使用以下方式驱动界面显示
adapters.add(new SubAdapter(this, new ColumnLayoutHelper(), 0));

这种方式的话感觉UI的展示全靠List<Adapter>这里面的东西进行驱动的,
如果使用adapter.notifyItemRemove(pos,count);方式局部刷新UI的话,
除了必须更改的原始的数据源List<Data>,还要更改List<Adapter>,逻辑上感觉过于复杂

能否直接通过原始的的数据源List<Data>方式驱动,不用List<Adapter>,就像viewType一样,搞一个layoutType由框架层去自动匹配,大不了Data这个原始数据必须实现一些配置layout属性的接口,这样的话在使用的复杂度上面有明显的降低,不容易引起困惑,也更匹配原生adapter的使用习惯,目前这种方式操纵数据驱动UI过于复杂,有没有考虑过相关问题呢?

@longerian

This comment has been minimized.

Copy link
Contributor

longerian commented Oct 19, 2017

你的建议很好,这个是可行的,我们也不是直接使用vlayout的,我们在外层包了一个自定义的adapter,所有样式 变化改动都可以通过adapter操作数据来驱动。

@longerian

This comment has been minimized.

Copy link
Contributor

longerian commented Feb 5, 2018

之前忘记提醒,我们是采用 Tangram 来使用 vlayout 的,vlayout的底层细节都不需要关心,只要按照 Tangram 要求的数据协议来进行配置,就可以自动创建、维护 layoutHelper。
@s949492225

@longerian longerian closed this Feb 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment