Im a running my app on the logitech revue. The menu does not appear up top like it should. Can you point out what I am doing wrong or direct me to some resources.
Here are some specifics.
- Theme: Theme.holo
- android:minSdkVersion=”8″ android:targetSdkVersion=”8″
- Device : Logitech Revue
Here are some snippets of the essentials:
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
Log.i("MENU","Opening menu");
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu, menu);
return true;
}
In res/menu I have the menu.xml
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/catalog"
android:title="Profile info"
android:showAsAction="ifRoom"
android:icon="@drawable/ic_launcher"/>
<item android:id="@+id/newvideos"
android:title="Playlist"
android:showAsAction="ifRoom"
android:icon="@drawable/ic_launcher"
/>
<item android:id="@+id/popularvideos"
android:title="Play Video"
android:onClick="handleCick"
android:showAsAction="ifRoom"
android:icon="@drawable/ic_launcher"
/>
To show the action bar you have to set either
minSdkVersionortargetSdkVersionto 11 or above as stated in Action Bar – Adding the action bar. I suggest you change the targetSdkVersion to stay compatible with lower API levels.This is how it works in general, the logitech revue seems to be a google tv device. I have no experience with that, not sure if there are any special things to consider.