Necronet
Necronet

Reputation: 6813

building an Android Status Bar like the New York Times app

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

New York Times Android notification bar

Upvotes: 1

Views: 616

Answers (2)

JustDanyul
JustDanyul

Reputation: 14044

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 :)

Upvotes: 1

Matt
Matt

Reputation: 5704

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

Upvotes: 4

Related Questions