ListView控件VS的LinearLayout [英] ListView vs LinearLayout

查看:226
本文介绍了ListView控件VS的LinearLayout的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一横电视视图,类似于你知道TiVo的形式系统和类似的人。对于每一个信道有一个与下一个6个小时左右的程序的行,与他们的播放时间的宽度成正比。

I'm writing a horizontal tv-view, similar to the ones you know form tivo systems and similar. For each channel there is a row with the programmes for the next 6 hours or so, with a width proportional with their play time.

我的想法是写于各行的自定义部件和栈这些在彼此的顶部。这应该让我逐步加载数据,而不是使用一个大的自定义视图。我不过仍需要向前单击时更新所有行页面的顶部/后退按键。

My idea is to write a custom widget for each row, and stack these on top of each other. This should allow me to load the data incrementally, rather than using one big custom view. I will however still need forward/backward buttons at the top of the page that update all rows when clicked.

现在我不确定我是否应该放在一个ListView或LinearLayout中这些意见。

Now I'm unsure whether I should place these Views in a ListView or a LinearLayout.

我已经收集了以下优缺点:

I have collected the following pros and cons:


  • 的ListView

    • 赞成

      • 内存使用效率 - 循环利用隐藏查看

      • 似乎被所有人使用,在Android社区,任何东西。

      • 这可能是更容易使懒惰,更新行时,因而需要更少的CPU。


      • 矫枉过正 - 我不会使用大部分具有的功能,提供

      • 这可能会稍难以附着在clickListeners。


      • 赞成

        • 使用简单。是否你所期望的东西。


        • 我还没有看到它的任何地方使用长列表。

        • 也许是慢?

        的似乎每个人都用论据ListView中还包括了禅师Twitter的应用程序,其中谷歌使用炫耀Android的好设计的。他们也似乎并没有使用它的大部分功能。

        The "Seems to be used by everyone" argument for ListView also includes the "Master" Twitter app, which Google uses to show off "Good Android design". They also don't seem to be using most of its features.

        你有这方面的工作经验吗?在那里我已经通过文档阅读时错过了什么建议?

        Do you have any experience with this kind of work? Are there any recommendations I've missed when reading through the docs?

        推荐答案

        我结束了使用自定义窗口小部件。
        我还是不知道哪个提到是最有效的,但。

        I ended up using a custom widget. I still don't know which of the mentioned is most effective though.

        这篇关于ListView控件VS的LinearLayout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆