In my application I use Action Bar and navigation mode, that uses tabs. But on a tablet action bar has a very small width. What should I do? Here is a screenshot:
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 want to handle the width of drop down menu on action bar. It is coming by default and title is not displayed in action bar.
In the google+ app width of drop down menu in action bar is very less. i want to have same in my app.
I am using App Compat library to use action bar.
Thanx.
Hi I am using actionbarsherlock and splitActionBarWhenNarrow to to get a bottom action bar with my menu information. I have set windowActionBarOverlay to be true.
In android 4.2 and below calling getSupportActionBar().hide(); will properly hide both the top and bottom action bars. In android 4.3 getSupportActionBar().hide() hides the top action bar properly but it leaves a blank white space where the bottom action bar use to be.
Can anyone help me with this?
This question already has an answer here:
How to display both normal and split ActionBar?
(1 answer)
Closed 9 years ago.
Just like the below image i want to show my icon
Click here
I want to split top and bottom action bar in both landscape and portrait mode of smartphone.
The below code is working only in portrait mode(top and bottom action bar show) but not in landscape mode bottom action bar options are showed in top action bar.
<application
android:uiOptions="splitActionBarWhenNarrow"
I just want to show both action bar in both landscape and portrait mode of smartphone like above image.
Thanks
Solution:
I have found the very nice solution for this problem, i think you will be also benefited using this solution
If you want both action bar will be separate then you should use Sherlock Action bar library. Using this library you can customize action bar as you like.
Here is the link
Thanks
You want the SplitActionBar, try this:
AndroidManifest.xml
<application
android:uiOptions="splitActionBarWhenNarrow"
http://developer.android.com/guide/topics/manifest/activity-element.html#uioptions
Add a bar at the bottom of the screen to display action items in the
ActionBar, when constrained for horizontal space (such as when in
portrait mode on a handset). Instead of a small number of action items
appearing in the action bar at the top of the screen, the action bar
is split into the top navigation section and the bottom bar for action
items. This ensures a reasonable amount of space is made available not
only for the action items, but also for navigation and title elements
at the top. Menu items are not split across the two bars; they always
appear together.
How can I hide the top Action Bar but show the Split Action Bar using ActionBarSherlock. I would like to have Tabs at the top instead like this:
The Android developer site states the following to hide the action bar but keep the split action bar:
If you'd like to hide the main action bar at the top, because you're
using the built-in navigation tabs along with the split action bar,
call setDisplayShowHomeEnabled(false) to disable the application icon
in the action bar. In this case, there's now nothing left in the main
action bar, so it disappears and all that’s left are the navigation
tabs at the top and the action items at the bottom, as shown by the
second device in figure 3.
https://developer.android.com/guide/practices/tablets-and-handsets.html#SplitActionBar
In my SherlockFragmentActivity I call the following, however only the app icon and title disappear and the action bar stays like this:
//Hide action bar
getSupportActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setDisplayShowHomeEnabled(false);
Calling getSupportActionBar().hide() hides the action bar but also hides the split action bar.
The tabs only roll up into the top action bar if you are using the Tabs provided by ABS. You're not using ViewPager/ViewPagerIndicator for the tabs by any chance are you? (I have this issue currently)