Problem: after updating the support library and using Toolbars, the overflow menu button is always showing on devices with and without hardware menu button
What I Need: I want the overflow menu button to show only when the device has no hardware menu button
menu.xml
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" >
<item
android:id="@+id/action_settings"
app:showAsAction="never"
android:title="@string/action_settings"/>
<item
android:id="@+id/import_data"
app:showAsAction="never"
android:title="@string/import_data"/>
in the activity (ActionBarActivity)
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
and in onCreate : setSupportActionBar(mToolbar);
Help would be appreciated!