1

I'm developing an app both android smartphone and tablet. I'm trying to add the menu button on the actionbar on android tablet (3.x and greater). I read some other questions on stackoverflow (like that: How to force use of overflow menu on devices with menu button ) but it is not what i want to.

at the moment I'm using the title bar to show the menu button, as you can see in this screen: enter image description here

And it's a "good" solution but only for version 3.x, because the version 4.x are both for smartphone and tablet, and i don't want to see the title bar because of esthetic reasons. so I would like to have something like that enter image description here

any suggestions?

1 Answer 1

1

This is not possible, except by specifying an android:targetSdkVersion of 10 or less, which at this point in time is not a good idea, as it will make your app look old.

If you do not wish to use an action bar, that is fine, but then you need to create your own menus that are designed to go with your own UI.

Sign up to request clarification or add additional context in comments.

2 Comments

mmm you are right, and i think it's a best solution... my app needs work on sdk version 10 and greater. so what do i do? i use a version check to not show the actionbar? thank you for your time CommonsWare
@antedesk: If you "don't want to see the title bar because of esthetic reasons", you do not need to do a version check for that. Simply suppress the action bar, probably via a NoActionBar theme (e.g., Theme.Holo.NoActionBar). For supporting this on API Level 10 and up, you will probably need to define your own custom theme that inherits from something like Theme.NoTitleBar on older devices and from something like Theme.Holo.NoActionBar on newer devices (using res/values-v11/ for the latter resource).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.