I develop an android application and put it in a android market. users put comments for me and tell me that setting button doesn't work for my application. I don't know what setting button is and how I can enable it for my application. can any one help me?
-
1Are you sure they are not talking about the menu button? – FD_ Aug 01 '13 at 09:57
-
with this description we don't know how to help you. What is your programming question or is just an off-topic chat? – Aug 01 '13 at 09:58
-
If its your own application, you need to know what all buttons you have added. Settings button is a normal button on tap of it, user can customize app. – Charan Aug 01 '13 at 09:59
-
I don't know, I am not sure – softweng Aug 01 '13 at 10:00
-
i don't have any setting button in my application. I guess they mean menu button in phone but I don't know how to enable it. – softweng Aug 01 '13 at 10:03
2 Answers
I guess what you mean is the menu button. The problem often is that some devices don't have a physical menu button, thus they cannot access the menu of your app.
Try to use a Holo theme for your app's activities and show an ActionBar. By default, the three dots button for your menu will then be shown in the ActionBar on devices that don't have a physical menu button.
For a consistend UI on all devices, you could show the menu button in your ActionBar permanently, whether the device has a physical menu button or not, using this code:
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
try {
ViewConfiguration config = ViewConfiguration.get(this);
Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey");
if(menuKeyField != null) {
menuKeyField.setAccessible(true);
menuKeyField.setBoolean(config, false);
}
} catch (Exception e) { e.printStackTrace(); }
}

- 12,947
- 4
- 35
- 62
Do you use Eclipse? Check if you have a method onCreateOptionsMenu in your activity class. Eclipse creates automatically this method and adds a menu in your activity (depending on how you create the activity class file)

- 442
- 7
- 18