《纽约时报》Android 应用程序的顶部有一个类似通知栏的东西。
我怀疑这是一个包含文本视图的布局。问题是,他们设法把标题拉下来,以呈现头条新闻。
谁能提供有关如何复制此内容的任何见解?
编辑:
是的,抽屉是我问题的解决方案,但我需要一个,因为纽约时间,默认的 SlidingDrawer 只能从下到上......所以我在 St Google 上查看并得到了一个不错的自定义组件滑动抽屉,在我需要的时候让它工作有些困难,但你可以按照自定义 SlidingDrawer 的布局定位问题
The New York Times Android application has something like a notification bar at the top.
I suspect this is an included layout with a text view. The thing is that they managed to drag that title down in order to present the top news.
Can anyone give any insight on how to replicate this?
Edit:
Yes the drawer was the solution to my problem nevertheless i needed one as New York time and the default SlidingDrawer are meant to only go bottom to top... so i looked over on St Google and got a nice Custom Componente Sliding Drawer, get some difficult to make it work as i need it but you can follow the case in Layout positioning problem with Custom SlidingDrawer
发布评论
评论(2)
我认为您正在寻找的是滑动抽屉。
http://developer.android.com/reference/android/widget/SlidingDrawer.html
编辑:
我发布的链接对于文档很有用,但可能无法完全了解实际发生的情况。查找示例的好地方可能是这里:
http:// techdroid.kbeanie.com/2009/08/android-sliding-drawer-example.html
I think what you're looking for is a Sliding Drawer.
http://developer.android.com/reference/android/widget/SlidingDrawer.html
edit:
the link I post is good for the documentation, but might not give a full idea of what is actually happening. A good place to find an example might be here:
http://techdroid.kbeanie.com/2009/08/android-sliding-drawer-example.html
正如您所说,他们很可能只是使用了 TextView。可以通过多种方式将其向下移动。最简单的方法是在其顶部放置另一个视图或视图组,并最初将其可见性设置为消失,然后在您想要显示它时将其设置为可见。
抱歉,我误解了你的意思。由于顶部元素是如此之小,我只是认为您的意思是您想要在另一个元素之上公开一个元素。我会对另一个答案进行投票,因为这很可能就是您想要的:)
They have most likely just used a TextView as you said. Moving it down can be done in multiple ways. The simplest is just to have another view or view group in top of it and initially set its visibility to gone, and then to visible when you want to show it.
Sorry, i misunderstood what you meant. Since the top element was so small, i simply thought you meant you wanted to expose a element on top of the other element. Ill up vote the other answer since this is most likely what you are after :)