Skip to content
This repository was archived by the owner on Jul 14, 2021. It is now read-only.
This repository was archived by the owner on Jul 14, 2021. It is now read-only.

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

@s949492225

Description

@s949492225

现如今使用以下方式驱动界面显示
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过于复杂,有没有考虑过相关问题呢?

Activity

longerian

longerian commented on Oct 19, 2017

@longerian
Contributor

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

longerian

longerian commented on Feb 5, 2018

@longerian
Contributor

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @longerian@s949492225

        Issue actions

          有一些建议,希望能够看到 · Issue #222 · alibaba/vlayout