weex icon indicating copy to clipboard operation
weex copied to clipboard

安卓的SDK 有hlist 和list iOS的只有list 这个怎么弄啊

Open hechengloong opened this issue 10 years ago • 6 comments

安卓的SDK 有hlist 和list iOS的只有list 这个怎么弄啊

hechengloong avatar Jul 26 '16 06:07 hechengloong

hlist 应该还是实验特性,文档中也没放出来 http://alibaba.github.io/weex/doc/components/list.html @MrDragonn 你是看源码发现的 :)

luics avatar Jul 26 '16 07:07 luics

@luics 其实我建议去掉hlist, 应该对外提供统一的list component,通过orientation来控制水平or垂直,通过direction控制从左至右or从右至左等。另外由于目前Android SDK 中的list通过RecyclerView实现,后期可能还会有加入GridLayoutManager、StaggeredGridLayoutManager等布局,通过attr的设置来实现不同展示更为合理一些。

LeeJay0226 avatar Jul 26 '16 11:07 LeeJay0226

@LeeJay0226 分成两个组件是因为,实现的限制导致 'orientation'不能动态修改.

sospartan avatar Jul 26 '16 11:07 sospartan

@sospartan 分成两个组件之后就是为了只能在初始化时设置orientation,不给用户动态修改orientation的权限?我的理解目前Android 上的RecyclerView虽然可以动态的设置LayoutManager,但很少有业务会去动态改LayoutManager,只会在RecyclerView创建完后设置一次LayoutManager吧

LeeJay0226 avatar Jul 26 '16 11:07 LeeJay0226

@LeeJay0226 我说的限制,不一定是android,H5/iOS也必须要考虑~~

sospartan avatar Jul 26 '16 11:07 sospartan

这个问题长时间没有讨论和反馈,如果有更多讨论仍然可以在这里继续,但这里会做close处理 谢谢

Jinjiang avatar Oct 24 '16 11:10 Jinjiang