How to avoid duplicate menu buttons in devices with API>10 - android

How can I remove or hide the soft menu button in the bottom bar but still keep the overflow menu button in the ActionBar.
I have set the target API to:
android:targetSdkVersion="11"
as suggested here.
My app does have menu items so I am overriding the onCreateOptionsMenu().
The menu button appears both in the right side of the ActionBar and in a bottom bar. I simple don't want the space in the bottom of screen to be wasted for a duplicate menu button. I have seen apps like YouTube or Google Play which only have menu button in the ActionBar so I assume there should be a way to do this.

Raising target API to 14 (android:targetSdkVersion="14") solved this problem.
with thanks to CommonsWare
`

Related

ActionBar with popup menu at the bottom of the screen

I'm using ActionBarSherlock and I wonder if it is possible to have a popup menu at the bottom of the screen additionally? I'd like this menu to appear when the user clicks the default menu button (hardware for older mobiles).
How can I do this?
The actionbar menu overflow is automatically replaced by items in "menu" popup if you have a hardware menu button.
http://developer.android.com/design/patterns/compatibility.html
In order for items to appear in there you should set
android:showAsAction="never"
to your menu items
You must take a look at the How to Create Android Menus?
I hope this will help you.

Menu overlflow button on device with softkey buttons

my application looks like this on my galaxy nexus:
How can I add the menu overflow button to my softkey buttons on the bottom?
Or is this the way it is supposed to work?
You're not supposed to manually add any button to soft key bar. When there is soft key bar at the bottom, ActionBar will add menu button at the top (as in your example - 3 dots button). If you need support for SDK<11, use ActionBarSherlock lib.
The menu menu button at the bottom where the soft keys are only appear when apps that have a menu but are built on older versions of android and they have not updated it yet to use the new actionbar menu.
In short no you cannot and users do not like when the menu button is in the soft key area because not all devices have soft keys so there will be a random black bar at the bottom of your screen just for the menu button.
Look here about menu's

overflow button on jellybean

I am developing an application with target Sdk 17. My current device is Nexus 7.
My app should be without an action bar so I am using the theme Theme.Holo.NoActionBar on the activity.
I want to show the overflow button (3 dots) at the bottom right (next to the recent task). but I can't make it to be visible. If I return the action bar I see it at the top right, but that's not what I want.
Is there any idea for anyone?
If you are talking about OptionsMenu button you must use ActionBar, or you can set android:targetSdkVersion="10" for your project in manifest file. This will enable compatibility behaviour and you will see menu button near other navigation buttons .

Creating Android Facebook-like menu on bottom bar

I'm using Galaxy tab and it's got a bar on bottom that appears all the time.
FB app shows a new item there that used as a menu button.
How can I declare my menu to be there like FB?
Thanks!
I guess they are still using the old options menu. You can achieve that effect by setting the target sdk to max 10. I wouldn't recommend that as the menu button hides information and is not the current way to go (I'd use an ActionBar)
You should definately look at the ActionBar. In addition to the tab navigation that is available, you have an option for a split action bar for top and bottom. ActionBar is part of Honeycomb (3.x), but if you want to support older versions, there is the ActionBarSherlock library.

Whether options menu at the bottom in Android can be made permanent?

Whether options menu at the bottom (Inflated menu) can be made permanent? The menu should be permanently inflated without the need for user to press the menu button?
whether it can be done?
whether it can be done?
No.
Besides, that menu is going away. Honeycomb and Ice Cream Sandwich are moving to the action bar pattern, where the options menu is integrated into the action bar as a drop-down menu and optional toolbar buttons.
If you want to give the user some always-visible set of actions, consider adding the action bar to your own applications. You can do this on pre-Honeycomb devices using third-party action bar implementations like ActionBarSherlock.
You can wrap your layout in a relativelayout and add buttons to the bottom. You can have it look similar too.
As Bill said you can add buttons in Relative layout and not create menu...if you need some code just tell me...
In which version you want the solution ,
in tab versions and 4.0 you can solve this problem as follows.
in manifest file add this attibute to application Tag android:uiOptions="splitActionBarWhenNarrow" so that your actionbar shows in the bottom. while your mobile is in portrait , in landscape it shows as usual on the top
and them add this flag to your menu item
MenuItem.SHOW_AS_ACTION_ALWAYS
check this link for more flags http://developer.android.com/reference/android/view/MenuItem.html i hope this will solve the issue

Categories

Resources