Listview 的效率与 ScrollView 的灵活性
我试图找出针对特定数据捕获应用程序的特定 UI 的最佳方法,其中我在垂直滚动视图的顶部有一堆表单小部件(EditText 和 Spinner),然后是一些已检查的条目(10 -200),最后是一些附加的小部件。
我正在尝试考虑利用 ListView 效率的最佳方法(使用视图回收和用于检查条目的自定义适配器选项),但可以灵活地在列表之前和之后包含其他小部件。
出于有据可查的原因,我已经消除了将 ListView 放入 Scrollview 中的想法。
我还考虑过将其分解为多个视图并使用 ViewFlipper,但这对于用户体验来说效果不佳。
我遇到的唯一另一个想法是将我的非列表视图项目作为列表视图页眉和页脚放入。这样我仍然可以将自定义适配器用于列表视图检查的条目,而其余的小部件则位于我想要的位置。
这听起来是最有效、最明智的方法吗?任何意见和建议表示赞赏。
I am trying to figure out the best approach for a particular UI for a particular data capture application, where I have a bunch of form widgets (EditText's and Spinner's) at the top of a vertical scrolling view, then a number of checked entries (10-200), and then a number of additional widgets at the end.
I am trying to think of the best way to get utilise the efficiency of the ListView (with the view recycling and option of the custom adapter for the checked entries), but the flexibility to include the other widgets before and after the list.
I have eliminated the idea of putting a ListView inside a Scrollview, for the well documented reasons.
I have also considered breaking it into multiple views and using the ViewFlipper, but this does not flow as well for the user experience.
The only other idea I have encountered is to put my non-listview items in as the Listview header and footer. This way I can still use my custom adapter for the listview checked entries, and the rest of the widgets are where I want.
Does this sound like the most efficient and sensible approach? Any comments and advice appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的应用程序中有一个自定义列表视图,上面和下面都有小部件。 没有ListActivity的ListView
只需将listview放入它自己的LinearLayout中,它应该可以完美工作。
I have a custom listview with widgets above and below it in my app. ListView without ListActivity
Just put the listview in it's own LinearLayout and it should work perfectly.