How to split icons in two actionbars - top and bottom? - android

I have total 7 icons for my android app.
Can i split them for mobile in two actionbars top and bottom? I mean 2 icons in top actionbar and remaining icons should be in bottom actionbar.

The action bar can be automatically splitted if there is no place using the property splitActionBarWhenNarrow, example:
<application
android:uiOptions="splitActionBarWhenNarrow" > ....

Yes but you will have to do this in code, eg. instantiate the icons and add them to the correct actionbar view. There is no implementation logic for this available in the xml format as far as I know.

Related

ActionBar tabs have space before them

I have an app that has transparent actionBar and is using AppCompat support library. My problem is that I want to align my ActionBarTabs to the very left but there is some space left and I want to get rid of it. Also, how to properly align the icons with the rest ? Is that in the size of icons ?
Here is the screenshot of my app:
If you use a 24x24 icon you will be fine. Try go to here download any icons you want and use the icons with 24dp.png in filename and see how it looks.

Android Actionbar Split And Position Items

I've made an ActionBar with action ActionBarSherlock and I've spitted it with
android:uiOptions="splitActionBarWhenNarrow"
How can I position the items now? All my items are at the bottom ActionBar, I want some at the top and some at the bottom ...
As per the ActionBar guide:
Split action bar provides a separate bar at the bottom of the screen to display all action items when the activity is running on a narrow screen (such as a portrait-oriented handset).
If you want items on both the top ActionBar and buttons along the bottom, then you should use a regular ActionBar and add the buttons as a custom layout (perhaps using the android.R.attr.borderlessButtonStyle). However, you will not get the auto-collapsing into a single ActionBar on larger devices, but that can easily be done by creating a menu/layout specifically for wider devices using a selector like layout-w480dp on v14+ devices.

Two menu bars with ActionBarSherlock

Is it possible to have two different menu bars with ActionBarSherlock: one at the top and one at the bottom of screen? I have seen it in many apps, including some system apps, but can't find the appropriate solution. Note that I want to work with both bars like with menus, not just write custom layout and work with simple views, and use them in several Activities in my app.
Is it possible to have two different menu bars with ActionBarSherlock: one at the top and one at the bottom of screen?
Use android:uiOptions="splitActionBarWhenNarrow" on your <activity> or <application> in the manifest.

Android action bar and tabs

I have implemented ActionBar in my app and I have 3 tabs (Fragments) inside the actionbar.
I want to show options (light blue colored bar in screenshot) with some buttons at the bottom of the screen.
Can someone guide me about how to implement this?
Thanks
to display the actionbar menu items at the bottom add to the activity element in the manifest file this attribute
android:uiOptions="splitActionBarWhenNarrow"
example:
<activity
android:name=".HomeScreen"
...
...
android:uiOptions="splitActionBarWhenNarrow">
Ok. I got your question. You can try a tab host for upper tabs and relative layout for the below bar where you can put your stuff.

Change direction of ActionBar

I am using ActionBar in my project. I want to change direction of ActionBar items means locate tab icons and logo in the right side of screen and locate menu items in the left side of screen. I googled but I didn't find any useful thing, aslo I read xml resource of theme and style in API 14 but again I didn't find any solution.
Action Bar now support right to left direction. It's introduced in the new API level 17 by
adding
android:supportsRtl attribute to the element in your
manifest file and set it “true"
have a look here for more information about managing the layouts from right to left RTL Layout Support

Categories

Resources