I am looking to implement a menu like used on the Android Uber app.
It seems to be like an action bar on top with 3 small settings stripes on left side. (probably not a real action bar)
When clicking in that area a black menu slides out from the left and occupies 70% of the screen.
The right side of the screen still showing the map is darkened to keep focus on the menu.
I like that style, it looks good and everyone immediately knows how to use it.
I would like to have the same but don't know where to start or if there is maybe something available that would do something similar.
The actionbar itself only offers the menu on top right which is better for pure settings.
I also experimented with a split action bar having the menu items on bottom but that also seems superior to the clean interface Uber provides.
You want the Android Navigation Drawer. It's an Android sanctioned navigation pattern and more details about it can be found here. For some more technical documentation and an example of how to use it, you can find a sample over here. It works great with the Action Bar so shouldn't need anything too custom outside of what the Android v4 compat library gives you.
Related
There is a task to display the navigation bar on the left side for android 4.4.2. Nothing of the sort found. Is it possible to do this?
Or, for example, to hide the navigation bar, and on the left side add own custom menu on the same level of layouts hierarchy order content is shifted to the size of the menu?
This solution should work everywhere, not just in one application.
Thanks for the help.
As far as I know you see that navigation bar there because you are using emulator genymotion. On real devices you should not be able to see it. Besides, those back button are physical buttons on some devices like samsung s2.
If you want a menu on the left you should implement navigation drawer. Good luck
My android app UI have two parts- a menu bar (blue color) and content area (gray color).
Here red is the device screen.
The menu bar should open from left to right whene the hamburger menu is clicked.
I tried with ViewSwitcher but that shows only one view at a time.
What is the right method to implement it?
UPDATE: I am looking for the solution for API level 10 onwards.
In the newest version of the ADT you can select Navigation Drawer as navigation type when you create a new Activity. This automatically implements this type of navigation for you.
Alternatively, check out this tutorial: http://developer.android.com/training/implementing-navigation/nav-drawer.html
If you are happy with the navigation bar overlaying the content, then use the navigation drawer as suggested.
Alternatively check out:
https://play.google.com/store/apps/details?id=com.desarrollodroide.repos
There are many open source libraries that you can pick and test, and then decide which one to grab the code for.
I am working on an app right now whose blueprints I got from a friend. I offered to use the ActionBar for screen navigation, but he insists on a little red button at the top-right of the screen.
I have two question:
Having never designed in android, can I make the ActionBar completely transparent, except for a little red square on the right so it looks like what i described?
If there is not such way, can someone please offer an alternative? I was searching for "button drop down list", but got only very old tutorials. Maybe I should look for something else?
Thanks a lot
Yes, you can make the Action Bar transparent. There is an example: Custom Translucent Android ActionBar. Of course, you can make completely transparant AB. Then you can add a MenuItem to the top-right corner (it will be your little red button).
Here you have an Android Action Bar Style Generator. As you can see, there is an option for solid or transparent Action Bar.
There is no need to break the rules with a proper navigation pattern (Action Bar).
I am developing an app on Android and would like to use the similar menu bar like Google Plus or Facebook, when you click the button, the menu bar will slide in and will not occupy the whole screen. Any ideas on that?
Thanks.
A pretty popular library for accomplishing the 'sliding menu' effect (or 'drawer' as the design guidelines on the Android developer website prefer to call it) is Jeremy Feinstein's SlidingMenu. It's also compatible with ActionBarSherlock, in case your project is using that too. Unfortunately, at this stage there is no component built into the SDK that allows you to do easily accomplish the same thing.
There are also a couple of alternative implementations for a sliding menu (do a search either here on SO or Google), but I haven't checked those out for a little while. If I recall correctly, there are especially some variations in terms of whether the ActionBar is supposed to slide along with the content or stay fixed at the top of the screen.
You can use FrameLayout in parent view and use translate animation in menu layout to show the slide in and slide out effect.
I'd like to create a navigation menu in my Android app: a bar always at the bottom of the screen, with 4 choices Home|Categories|Search|Favorites, and the current page highlighted.
It seems the options menu can hardly be customized, so I can't use it.
Do I have to add this navigation bar in every layout or is there any better solutions?
Thanks
Julien
It sounds like you're replicating an iPhone interface. As most Android phones have buttons along the bottom of the screen (Home, Back, etc) it's likely to be a bad idea to put navigation there as it's easy to hit the wrong one.
The Google-recommended approach is to use the Action Bar pattern, across the top of the screen, which is very clear, and means your app is consistent with others (look at Twitter, Google Maps, Facebook - they all use the action bar pattern).
From Honeycomb (v3.0) onwards:
http://developer.android.com/reference/android/app/ActionBar.html
A simple library to create an Action Bar on any version of Android
https://github.com/johannilsson/android-actionbar
To create an action bar that uses that library on versions earlier than 3.0, but uses the official implemention for v3.0+, try this:
https://github.com/JakeWharton/ActionBarSherlock
The action bar is highly customisable, but remember that a key to a nice user interface is consistency across the platform, i.e. your app consistent with other apps and the OS.
If you need a navigation with more items or items within a specific page, you can use TabLayout, but for your primary nav, use the action bar, that's what it's for.
Use the TabLayout