building an Android Status Bar like the New York Times app - android

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

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

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

Related

Android drawer not for navigation

I wish to know if it is possible to do something. I know this is not the purpose of a drawer, but I have to use it something else than navigation in my case.
For example, it want to display some text, with drag and drop, the user can delete text or add new text with a button in it.
I can't display this text outside of this drawer because of UI.
I think it's not possible (I find nothing to do or talk about it on internet), if you can confirm this to me, it will be helpfull.
If you think it's possible, do you have any idea where to start ?
And, can I use a short video instead of an icon for an item ?
Thanks for your answer.
The DrawerLayout is just a different type of ViewGroup. You can place anything you want within it.

Bottom Panel in Android

I'm trying to design an app with a layout that will roughly look like this (don't mind the color):
How can I achieve something like that? I'm thinking of using a CardView for that bottom panel (I don't know what it's really called).
Furthermore, I want to hide it (animating it) when the use scrolls on the content. I have tried many codes but they won't work so I won't put them here anyway (like what's suggested here). Thanks for the help.
Whenever I have a question along the lines of "How do I do this neat UI thing I saw once?", I always start by checking out wasabeef's amazing UI library collection. In your case I might start by looking at bottomsheet or AndroidSweetSheet.

Action bar with tabs on the top and additional buttons below

I'm trying to figure out navigation in the app I'm making, and want it to look like it does on the phone to the right (link below), except I want the menu at the bottom to be directly below the tabs. I tried googling and searching for hours, but I cant seem to figure out.
I have managed to make the tabs (with Fragments and such).
I apologize if this really isn't that hard, but being new to this it is kind of hard to wrap your head around everything. Either way, thanks.
I think you are looking for a custom layout.
http://www.vogella.com/articles/AndroidActionBar/article.html
Look at section 5, should be pretty simple from there.
That being said, don't fight the OS. I always ask myself questions like: Do you really need tabs above a menu? Can you quote another application doing that?

Why it is not good design to align tabs at bottom of the screen

I know that we can place tabs on our convenient with top alignment or bottom alignments.But when i was reading the developer.android.com.The training section for lateral navigation has emphasized on the fact that tabs should not be used at bottom of the screen.But i don't find any reason why they are insisting someone to not use tabs at bottom.
Can any one explain me?
you can find this article here
you can find that lines below figure 5 at the end of the paragraph.
advance thanks for giving attention to question.
Consitency: It is at the top in most apps
Usability: If you use eye trackers you see that users read a page from top to bottom. If the tabs are at the top they are easier to find.
Option menu: There is already an option menu at the bottom.
It's very simple, it's all about UserInterface Concepts (there are many out there, android has an own: http://developer.android.com/guide/practices/ui_guidelines/index.html ). One of them is "Consistency" - we users expect tabs (especially in android, but also in browsers) at the top and that's why they should stay there.
Also there are a few "famous" rules for userinterfaces.
One set for example is from Shneidermann: http://faculty.washington.edu/jtenenbg/courses/360/f04/sessions/schneidermanGoldenRules.html
I'm no expert, but I'd think it's simply a matter of convention. Users would probably expect tabs to be towards the top of the page. It's comparable to putting a file menu to the far right of a menu bar rather than the left.

Which Android control to use?

I'm taking my first steps in Android programming.
My application is to create entries in a database. For this task I have created a new Activity. All is fine - but I don't really like how it looks.
Currently, the emulator shows this:
I'd like to have something similar to the "New Contact" Activity:
Buttons at the bottom of the window, not directly below the other controls (I'll hopefully figure that out myself)
Buttons within a nice "box" like shown in the screenshot (what's the control hosting the buttons here?)
When soft-keyboard is displayed, the buttons should "move up". If there's not enough room, the entire area should be scrollable (I'll try and figure that out myself too)
Sample can be seen here:
Which control hosts the buttons in the above "New contact" screenshot? I'd like to use the same for my buttons.
One way to figure out what an existing activity does is to use hierarchyviewer and examine the activity's contents.
Another way to figure out what a native Android activity does is to look at the source code. In this case, it would appear that the buttons are inside of a horizontal LinearLayout with style="#android:style/ButtonBar" to give the silver sheen. That style, in turn, uses #android:drawable/bottom_bar as its background. That image can be found in your SDK installation -- go to the platform directory of your choice, then data/res/drawable-hdpi and data/res/drawable-mdpi for the two versions.
The contacts layout looks like a ListView sitting on top of some sort of RelativeLayout or LinearLayout housing the buttons. The silver background may simply have been set using android:background on the Layout itself (layouts are views).
I found that the commonsware books are excellent resources for getting started and have good examples for this type of layout.
Hey, this is a little late, and I know you've already got the silver bar you wanted, which is all good, but I've stumbled upon a really good guide on controlling the soft keyboard for best user experience. It covers, among other things, how to make the visible area resize to fit the button bar in the view while typing, which is done by specifying the activity in the manifest file like so:
<activity android:name=".MyActivity" android:windowSoftInputMode="resize" />
I really recommend reading it, it covers a lot more helpful stuff than just that. Hope that helps; I couldn't see that anyone else has answered that particular part of your question.
You can put them in LinearLayout and assign weight of 1 to each of the buttons.
Also if you own dev phone / or want to see UI of the application in emulator - there is a very cool tool call hierarchyviewer
http://developer.android.com/guide/developing/tools/hierarchy-viewer.html
and you can see how UI of app you like has been laydown.

Categories

Resources