I cannot get the action bar to display my actions. All of them are displayed in the overflow menu. I have inserted all the relevant codes below. Can anyone see my problem?
From action:
public boolean onCreateOptionsMenu(Menu menu) { MenuInflater mi = getMenuInflater(); mi.inflate(R.menu.viewer_menu, menu); return true; } @Override public boolean onMenuItemSelected(int featureId, MenuItem item) { switch (item.getItemId()) { case R.id.menu_download: return true; case R.id.menu_star: return true; case R.id.menu_report: return true; case android.R.id.home:
From the manifest:
<activity android:name=".CustomActivity" android:label="">
From the values ββfolder-v11 (themes.xml)
<resources> <style name="MyTheme" parent="@android:style/Theme.Holo"> </style>
from the menu folder (viewer_menu.xml)
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/menu_download" android:title="Download" showAsAction="withText" android:orderInCategory="2"/> <item android:id="@+id/menu_star" android:icon="@android:drawable/ic_menu_upload" android:title="Star" showAsAction="always" android:orderInCategory="1"/> <item android:id="@+id/menu_report" android:title="Report Problem" showAsAction="always" android:orderInCategory="0"/> </menu>
source share