最佳实践相结合的名单和非列表视图,如市场 [英] Best practices combining list and non-list views, like the Market

查看:140
本文介绍了最佳实践相结合的名单和非列表视图,如市场的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图解决一个问题,看似许多Android开发者,这是怎么点缀与非列表数据列表,在一个大的滚动窗格。

I'm trying to tackle a problem that seemingly many Android developers have, which is how to intersperse lists with non-list data, in one big scrollable pane.

我心目中的模型是在市场上单独的应用程序屏幕。你有一个很大的描述,一些延迟加载的评论列表,然后说做不同的事情,就像访问开发者的网页个别项目,给他们打电话,等等。然后在他们之间的一切,都是不错的节标头。

The model I have in mind is the screen for an individual app in the Market. You have a big description, a list of a few lazily loaded comments, and then some individual items that do different things, like visit the developer's web page, call them, etc. And then in between them all, are nice section headers.

仿效​​这种做法似乎是极其困难。我读过足以让答案和邮件列表的帖子就知道,不要把一个ListView滚动型里面,但我不想使用和addHeader()和addFooter()有非常复杂的页眉和页脚的观点相同的效果。

Emulating this approach seems to be extremely hard. I've read enough SO answers and mailing list posts to know not to put a ListView inside of a ScrollView, but I want the same effect without using addHeader() and addFooter() with very complex header and footer views.

我使用,我可以欣赏自己的股票一个的LinearLayout试过,但我不能让愉快的点击效果,默认列表项有(橙色背景,白色长点击等)。

I've tried using a LinearLayout that I stock with views myself, but I can't get the pleasant click effects that default list items have (the orange background, white for long-click, etc.).

我该怎么办?

推荐答案

看看我的 MergeAdapter ,其目的是处理的情况是这样的。

Take a look at my MergeAdapter, which is designed to handle scenarios like this.

这篇关于最佳实践相结合的名单和非列表视图,如市场的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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