How to add custom buttons to the Android 3.0+ System Bar? - android

Does anyone know if there is a way to add custom buttons to the Android System Bar in Android 3.0+ (Honeycomb/ICS)?
I would like to add an application-provided button to that menu, but I have not been able to locate any API functionality that will allow it. I know that this area is sort of unofficially "off limits" to normal, non-system-level applicaitions, but I was wondering if anyone knew of a way to do this anyway?
Note: I am speaking specifically about the "System" bar that shows up along the bottom of the screen and not the "Action" bar which each app can customize at the TOP of the screen.
Let me know if you have any thoughts on this, thanks!!!

Does anyone know if there is a way to add custom buttons to the Android System Bar in Android 3.0+ (Honeycomb/ICS)?
Sorry, this is not supported. You can add a Notification that will appear on the right side of the system bar, but not with the rest of the system buttons on the left.

Related

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.

Using Option menu for non-physical buttons devices

I am developing an application that must hide title bar to increase screen spaces and for design issues. on non-physical buttons devices like nexus-4 and for Android > 3.0, I can't switch to use Action bar because the title bar is hidden, and in the same times these devices hasn't physical buttons to use standard menu.
My Question: How can I solve this problem
Thanks
How can I solve this problem
Modify your UI to either:
Add back the action bar, or
Add something else on your screen, such as a button, to display something else on the screen that will serve as your "menu". You can see this approach used by many games.

How do I place the three vertical android dots wherever I want within my app, but will still trigger the menu?

I'm building an android game that doesn't have an action bar. Even though I don't have an action bar, I still want the three vertical dots placed somewhere within my app. I'm not sure if I have to create my own image file that contains the dots, or if there's some way to move the dots in the layout manager in eclipse. Then when these dots are selected I want it to do the vertical drop down menu option like it does in the action bar.
Also I want the dots to disappear in android phones running under android 4.0, so that they can just use the normal menu button. Is this possible? It would be even better if I could get the three dots to trigger the menu in phones below 4.0 but I don't think that's possible so I'd rather just hide it entirely.
Thanks.
I'm not sure if I have to create my own image file that contains the dots
The standard overflow icon should be in your SDK.
or if there's some way to move the dots in the layout manager in eclipse
No.
Then when these dots are selected I want it to do the vertical drop down menu option like it does in the action bar.
You are welcome to implement your own PopupMenu for displaying a menu.
Also I want the dots to disappear in android phones running under android 4.0, so that they can just use the normal menu button
You are welcome to call setVisibility() on whatever you are using for your image whenever the mood strikes you. You will also need to arrange to display your own menu for MENU button presses.
IOW, you will need to roll your own menu system: displaying your trigger, displaying the menu based on the trigger, and doing something on menu choice selections. You are welcome to crib bits of this from the AppCompat action bar in the Android Support package, or perhaps ActionBarSherlock, if you wish.
It would be even better if I could get the three dots to trigger the menu in phones below 4.0
Since you are writing it all yourself, you are welcome to have it do whatever you want.

Action Bar, OutlookBar, Navigation bar with SDK 8

I would like to get an action bar (navigation or outlook bar) which contains e.g. 6 Icons with text. If I click on an Icon, I would like to replace the content area of the outer control (nesting the 6 buttons) by an inner control in addition to a small back menu on top of it. The back button could also indicate the location where we are. So it is close to the outlook bar used within microsoft office.
I am using android:minSdkVersion="8". So I did not take a closer look to the android action bar. I am currently using the tab control. However, the tab control is not really what I want. Or can this be adjusted to provide my described functionality? I create controls at runtime, so I can tweek it, if someone knows how to get it close to what I am searching for. As alternative I would appreciate a library, with such a control.
Android Support Library, revision 18 extend support of ActionBar down to API v7. There are good instructions how you can import it (v7 appcompat) to your project.

How to Create Clickable on Icon in Status Bar to Run Function/Method/Code

Okay, this would be fairly simple in some other environments, but I can't figure out how to do it, or if its even possible in Android.
I have placed an icon on the status bar. I would like to run a method of another class whenever the user selects that icon. I've seen similar functionality used in volume icons that sit on the status bar that allow a user to raise or lower the volume when the icon is clicked. However, these icons are on the right side of the status bar, and from what I've seen, I'm not allowed to put an icon there. I don't know if that kind of functionality is available to left side icons.
So basically, I'm looking for how to run a function when a status bar icon is clicked. I don't want to open an activity, I just want to run a function.
What you're searching is probably related to the Android UI ActionBar pattern.
Regarding that I'd like to consider you to take a look at the Google I/O 2010 Android app. It contains many of these patterns and may help you out.
Summarizing, you have to create your own ActionBar (or Status Bar as you call it). You place your buttons, retrieve them via the findViewById(...) method and associate a click listener.

Categories

Resources