Android: How to control placement of bottom app bar actions? - android

I am implementing material design bottom app bar but I can't get the placement of the icons as I want.
This is what my app bar looks like currenly.
This is how I want it to look.
I want to have control over which side the actions is placed. Is that possible?

Related

how to make a Short top app bar using material design?

Fortnightly’s short top app bar: Material Design
On the scroll, the top app bar collapses to become a short top app bar, allowing more space for content. The short top app bar contains...
The short top app bar contains two elements: the navigation icon to open the navigation drawer, and the Fortnightly logo.
I found this guideline in material design io site, could anyone share your idea, how to make this using material design, not 3rd party plugin.
This is done using a MaterialShapeDrawable with a ShapeAppearanceModel. You can also check the source code for the toolbar.

center align icons in titanium action bar for android

Is there any possible way to center align the action item icons that are shown in action bar of titanium app for android. I have searched a lot of places for this solution but had no luck. I want the action bar to look like the below image. Also tell me the way to not show app title in the action bar.
This is not a Titanium issue.
As you can read in Google's documentation, you won't be able to center anything in the ActionBar. Default (and expected) behaviour is to align action icons on the right (or left if reversed).
I don't recommend it, as it goes against Google's guidelines, but you will be able to center icons if you create a fake ActionBar:
- Remove native ActionBar from any window in your app
- Create a Titanium View that mimics the ActionBar
- Add icons and bind click events.
That's it, you are done.

Android - Slide Menu like in Uber

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.

Customize system combined bar /navigation bar for Android tablet (bottom)

I would like to override (add more buttons that would take me to several activities/fragments) to the system Navigation Bar on a tablet (according to this android ui-overview it is a "Combined bar" (for tablets)
Is there a way to do this?
I couldn't find a Navigation class in the android.app package, like ActionBar.
If adding buttons to the combined/navigation bar is not possible, I think there are several options, but I'd like to explore this first:
- use the action bar on top instead
- add a bottom bar above the navigation bar (not really fine, since it would be on top of the combined bar), like they are showing here:
Action Bar
Thanks a lot,
Cristian
Is there a way to do this?
No. The only thing you can add to the system bar are Notifications, which are not meant for this sort of navigation.
If adding buttons to the combined/navigation bar is not possible, I think there are several options, but I'd like to explore this first: - use the action bar on top instead - add a bottom bar above the navigation bar (not really fine, since it would be on top of the combined bar), like they are showing here: Action Bar
If you are referring to the section titled "Layout Considerations for Split Action Bars", that is referred to as a "split action bar", and can be enabled on an <activity> via android:uiOptions="splitActionBarWhenNarrow". However, that will only take effect for -small/-normal screens in portrait orientation. Your buttons will automatically be placed in the action bar at the top of the screen in other circumstances.

Customizing Bottom Action Bar in Android

I want to use the split Action Bar - one on top, one on bottom. I know you can call it with this:
uiOptions="splitActionBarWhenNarrow"
My 2 questions are simple concepts:
I would like only two items on the bottom; one on far left, one on far right. Is this possible? It seems to be almost an overflow and pushes everything up top -- down to the bottom. Is there a way to control what items will show up on which bar?
Also, I have holo.light.darkactionbar theme. Yet, for the bottom bar, it keeps the light background AND the white text so you can not see the icons - is it possible to apply dark background like the top bar?
I would like only two items on the bottom; one on far left, one on far right. Is this possible? It seems to be almost an overflow and pushes everything up top -- down to the bottom. Is there a way to control what items will show up on which bar?
Unfortunately not. All action items will be pushed on to the bottom bar when using the split action bar. One way to get around this would be to not use the split action bar, and have a custom view at the bottom holding buttons for all the items you want at the bottom. You'd probably be able to emulate the style of an split action bar fairly well using themes.
Also, I have holo.light.darkactionbar theme. Yet, for the bottom bar, it keeps the light background AND the white text so you can not see the icons - is it possible to apply dark background like the top bar?
This sounds odd and isn't standard behaviour (both bars are dark in my app), are you using a custom theme? If you want to override this manually, define a theme with a custom android:backgroundSplit value as shown on the Android Developers website.

Categories

Resources