Eventhough its possible to hide the Status bar while keeping the Action bar the docs here emphasises
"You should never show the action bar without the status bar."
What is the reason for this? Is it just a UX guideline or are there other reasons for it?
Related
What are the different bars available in android and where are they located? Pics to support each type would be highly appreciated and helpful for beginners.
The status bar is where the clock, battery icon, notification icons, and the like reside. Most of the time, it is at the top of the screen. This is provided by the system; the app does not directly manipulate the contents of this bar.
The action bar (sometimes referred to as the app bar), if it exists for an activity, will be at the top of the activity's content area, typically directly underneath the status bar. Activities control whether there is an action bar and, if so, what it looks and works like.
The navigation or system bar is where the HOME, BACK, etc. buttons are. This is usually on the opposite side of the screen from the status bar, and therefore usually is at the bottom of the screen. This is provided by the system; the app does not directly manipulate the contents of this bar.
Avoid confusion and call them:
status bar
app bar (action bar is also ok)
navigation bar
Synonyms
action bar, app bar, and title bar all refer to the same thing. A Toolbar is a certain implementation of this bar.
One of the purposes of the status bar is to show notifications. Therefor some call it the notification bar.
The navigation bar is sometimes called the system bar, but the latter name should be avoided. It's too easy to mistakenly think that the system bar contains system information like battery level and network connection, while that's actually the job of the status bar to show these things. The term navigation bar is much clearer. I've also seen it getting called home bar.
Note that iOS also has a navigation bar where it serves a slightly different purpose compared to android - the purpose overlaps with android's navigation and action bars. Moreover, the navigation bar in iOS is typically (always?) located at the top, just below the status bar. See Navigation Bars on developer.apple.com.
References
Android bars at material.io (status bar, app bar, navigation bar)
Add the app bar at developer.android.com (app bar, action bar, Toolbar)
#android:style/Theme.NoTitleBar is a theme without an app bar. It was later called action bar in the code, e.g. in #android:style/Theme.Holo.NoActionBar. (title bar, action bar)
Navigation Bars in iOS on developer.apple.com (different purpose of navigation bar in iOS)
I have achieved hiding and showing the actionbar on scroll however I have a few problems with it. 1.) when I click on a tab in my application that requires the action bar to be show then return to the screen where the action bar can be hidden, there is a white space that is the exact size of the action bar under the action bar. 2.) There is an annoying flicker sometimes when the action bar is being hidden or unhidden.
I have seen on many google applications and applications such as instagram where the action bar pushes up relative to the position on screen. I have searched for libraries or ideas on how to implement that technique but have not found any? Is there any way I can at least get rid of the actionbar flicker or is there a library where I can implement the actionbar push up on scroll in my application?
I'm looking to show the action bar "action mode" persistently throughout the life on an activity. This activity edits an image and once the user clicks the check mark the image is saved and the activity exits. However, if they press back the edit process is canceled.
My action bar is translucent with overlay content set to true. Here is how it looks.
Here is what I have tried
1. Action bar is translucent as well as my action mode. Action mode is overlayed causing a darkening of the action bar.
2. Make action bar transparent. Everything looks good but once you click the check mark you see an odd looking action bar without a background which is shown for a second.
3. Hide the action bar. This causes animation issues where you can see the action bar animate in while the activity is exiting.
All these attempts are hacks and they don't work well. Maybe I can somehow add the check mark on the left? I'm not sure how to reproduce that action mode as my action bar. Hopefully someone has a good idea on how I can achieve the action mode style.
I need to hide the menu button in the action bar, how to hide it in action bar on Android? My minSdkVersion is 7, and I'm using support-v7-appcompat.
If you mean the action bar overflow (three-dots affordance), you "hide it" by not having anything in the overflow. That affordance will only appear if something appears in the overflow, either because you put it in the overflow (app:showAsAction="never" and android:showAsAction="never"), or there was insufficient room in the action bar for everything else you wanted.
It is possible to have a split Action Bar only in Action Mode?
My application have only the top action bar, but it's Contextual Action Bar needs to be splitted in two (top/bottom).
I found this:
The contextual action bar is not necessarily associated with the action bar. They operate independently, even though the contextual action bar visually overtakes the action bar position.
on http://developer.android.com/guide/topics/ui/menus.html#CAB. So i think it's possible, but how?
I'm pretty confident it's not possible - and even if it is - i would cringe to see the hack.
The cab is a crafty beast that offers a lot of convenience out of the box but doesn't like to be tampered with.
The platform takes care of you fantastically by placing a CAB at the bottom if required or collapsing items , but as far as UI designs go, you should avoid relying on the bottom bar.
see https://stackoverflow.com/a/8609144/1593156 .