ListView中有一个(半和或)hidable头 [英] ListView with a (half- and or) hidable header

查看:182
本文介绍了ListView中有一个(半和或)hidable头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是,我甚至不知道该怎么寻找。

My Problem, is that I don't even know what to search for.

我想一个ListView。 此ListView中有一些元素有粘性的状态。

I want a ListView. This ListView has some Elements with a "sticky" state.

如果我向下滚动设备上的名单,我想,随着国家粘性的所有ListElements,被粘ontop列表(非滚动),直到有另外一个推走的。元件的其余部分都应该滚动为正常。

If I scroll down the List on the device, I want that all ListElements with state "sticky", to be sticky ontop of the list (non-scrollable) till there is another one "pushing it away". The rest of the elements are supposed to scroll as normal.

我已经看到在谷歌市场那种名单。如果你有一个大屏幕就可以看到在左边上的任何应用程序中的DetailView该列表,或者如果你有Android的JB,同样的效果是,在谷歌现在的应用程序的谷歌搜索栏。

I've seen that kind of List in the Google Market. If you have a big screen you can see that list on the Detailview of any app on the left side or if you have android JB, the same effect is on the google search bar in the google now app.

图片一:你可以看到在左侧正常的ListView 图片1

Image One: You can see the normal ListView on the left side

图片二:你可以看到正常的ListView滚动了一下 图像2

Image Two: You can see the normal ListView scrolled up a bit :

图片三:你可以看到,我真正想要的。该视图滚动起来,但粘价格不会消失。相反,所有其他元素,又在粘一 图片3

Image Three: You can see, what I actually want. The View is scrolled up but the "sticky" price does not disappear. Instead of that all other elements, went under the "sticky" one :

我该怎么办呢?

推荐答案

我认为你的意思做一些同步滚动。

I think that you meant to do some "synchronized scrolling".

有一个伟大的文章,解释如何,他们已经对谷歌播放做过:

There's a great post explaining how they've done in on Google Play:

http://www.pushing-pixels.org/2011/07/18/android-tips-and-tricks-synchronized-scrolling.html

希望这就是你要找的人。

Hope that's what you were looking for..

这篇关于ListView中有一个(半和或)hidable头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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