Navigation Drawer with Action Bar - android

I am looking for creating an dvd library in android, The design is having navigation drawer for quick navigation, and one action bar which is having only new DVD list count i.e. 4 in image(which is dynamically updated).
Let me share you
First Thing which make confusion for me
why do i need action BAR ? (to just display new items and navigation drawer icon)
I am not sure on which pattern i should follow. I need your input for this. If I need to go with this approach how to achieve custom action bar with navigation drawer on activity.

IMO there's no reason not to adhere to the actionbar pattern.
You anyway need a place where to trigger the open/close of the drawer from. Having the actionbar matches the guidelines and makes the usage of the app intuitive for the user (as it is already used to the pattern).
Also having the actionbar allows you to brand your app more (by keeping keeping the app logo always visible and styling the action bar with your brand colors) and to keep consistency in case you need to add actions in one of the low-level screens (or in the main one, maybe in a future release)
To add the counter to the action bar, see the actionview section at http://developer.android.com/guide/topics/ui/actionbar.html

Related

Fly-out menu hovering above action bar, but not hiding it

I have created a fly-out (sliding) menu by an example.
In example author uses NoActionBar attribute for activity to hide action bar.
But in my app I want to use actionBar's tabs (tabbed control, tab navigation) for navigation (like in a third picture).
Also in first and second pictures we can see a fly-out menu with desired view (screens from vk android app). Theirs menu hovers above action bar and they use tab control!
Last picture is my app. There menu is under action bar.
So, my question is: How can I make fly-out menu that will hover above action bar? But not with hiding action bar, so I will have possibility to use actionBar's tabs (it is impossible with NoActionBar attribute).
]
UPD: Found nice example here https://github.com/Cheesebaron/SlidingMenuSharp
I recommend you looking into this example, it has all the needed information: https://github.com/chrisbanes/cheesesquare
Your problem is that you inflate your navbar "under" the main activity (I guess, in a fragment).

Non-standard back button in Action Bar Android

I've seen in several apps a non-standard back button (image #2) in the action bar,
Normally when I config a navigation drawer or the setDisplayHomeAsUpEnabled it just looks like image #1
How can i accomplish the non-standard style?
That is not a back button. It is sometimes called a "hamburger icon", and it is specifically used for indicating the presence of DrawerLayout navigation. You can find more information in the Android documentation. You can see more about the icon's functionality here.

Using both list navigation and tabs with ActionBarSherlock?

I'm looking through the ActionBarSherlock samples demo, and I see that the List Navigation and the Tab Navigation both make use of the ActionBar's setNavigationMode method. This tells me that you can only have one or the other. If I want the user to have list navigation to move around between activities but I want some activities to have tabs, is there a different way to add tabs than via navigation mode? Is it against ActionBar design guidelines to use both? I don't look at tabs and consider this to be a navigation feature, so I find it odd that you get one or the other.
This tells me that you can only have one or the other
Correct. Bear in mind that with action bar tabs, Android will convert you to list navigation, on its own, in certain configurations, whether you like it or not.
If I want the user to have list navigation to move around between activities but I want some activities to have tabs, is there a different way to add tabs than via navigation mode?
You can use a ViewPager with PagerTabStrip or the tab flavor of ViewPagerIndicator.
Or, you can go retro and use TabHost and TabWidget.
Is it against ActionBar design guidelines to use both?
The design guidelines refer to them as separate options for "View Controls". More importantly, given the automatic conversion of tab navigation to list navigation, it would be seriously confusing for the action bar to have two Spinners' worth of navigation choices.

android action bar with tabs below the screen

For my application , I'm planning to have a design as this:
http://img811.imageshack.us/img811/7045/problemel.png
-Design needs to have a title bar which is indeed the action bar in android. To overcome the compatibility issues, I used the sherlock action bar which is said to support older versions that dont have action bars. I havent tested yet for the older devices however.
-As far as I know, for navigation , we could rather use tabbed or dropdown list methods. I want to have constant tabs for every page in my app to stand below the page. This reflects the tabbed action bar, however I want it below not just under the action bar. I don't know how but youtube application somehow has it in the middle of the screen (if it's not a custom view). So how do we have tabs positioned in the bottom of the page?
-Also I want to have another menu, whose items depend on the page it's on. But the apperance will be the same for every page. In the picture on the left this menu has buttons as "Bt 1" ,"Bt 2". I dont want to repeat the same xml for every activity page, but I'm not sure how to achieve it without repeating. If the action bar allowed using both navigation tabs and the drop down list, I could put the items of this menu in the dropdown list just as the picture on the right (onto the gray button). But I guess it does not?!
Therefore I have to repeat the menu xml code in every page or is there another smart way?
Any advice will be appreciated.
This can be achieved not with tabs but by adding items to a linear_layout with a gravity of bottom but it is a bad practice as #D_Steve595 stated and should be avoided in android designs.
actionBar.setHomeButtonEnabled(false);
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setDisplayShowHomeEnabled(false);

Customized navigation menu in Android

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

Categories

Resources