Reputation: 1804
Is there any possible way to display the three dots menu in action bar on divices with hardware menu button? Like Samsung Galaxy etc.
Upvotes: 7
Views: 14189
Reputation: 7472
This is worked for me
Use
<uses-sdk
android:minSdkVersion="8"
/>
instead of
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17"/>
in manifest xml
Upvotes: 0
Reputation: 6029
Looks like your answer is at the link below. There's an explanation of why you wouldn't want to do it, and another answer providing a hack to do it anyway (on android 4.x devices).
How to force use of overflow menu on devices with menu button
Upvotes: 4
Reputation:
The guide says:
…
Menu items that are not promoted to an action item are available in the overflow menu, revealed by either the device Menu button (when available) or by an "overflow menu" button in the action bar (when the device does not include a Menu button).
Upvotes: 2
Reputation: 4119
In my app I have nested menu like:
//menu.xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/three_dots_item"
android:icon="@drawable/ic_three_dots"
android:title="@string/title"
android:showAsAction="always">
<menu>
<!-- items to show -->
</menu>
</item>
</menu>
It's not real overflow, but it's a simple workaround.
Upvotes: 1