Note that there are some explanatory texts on larger screens.

plurals
  1. POCannot see Options Menu on Android Device
    primarykey
    data
    text
    <p>I've got an application written with <code>minSdkVersion="8"</code> and <code>targetSdkVersion="19"</code>, because is so simple and I need it to be used on low level android devices. The problem is when I try to use it in an Android 4+ device. I cannot see the Options menu.</p> <p>When I use the app in the Emulator, I use the "Menu" <code>button</code>, and I can see it. But not in my tablet or mobile phone (both with 4+ version).</p> <p>Okay, let's see the code:</p> <p>In the <code>manifest.xml</code> file I have this (I think the problem is the theme...).</p> <pre><code>&lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19" /&gt; &lt;uses-permission android:name="android.permission.BLUETOOTH" /&gt; &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /&gt; &lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Holo.Light" &gt; &lt;activity android:name="com.clv.app2.MainActivity" android:label="@string/app_name" android:theme="@android:style/Theme"&gt; </code></pre> <p>And I have a simple <code>OnCreateOptionsMenu</code> like this in <code>MainActivity</code>... (I have defined only two options).</p> <pre><code>@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.option_menu, menu); return true; } </code></pre> <p>Can anyone can help me to see where is the problem with this?</p> <p>Thank you in advance.</p> <p>EDIT:</p> <pre><code>option_menu.xml &lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;item android:id="@+id/scan" android:icon="@android:drawable/ic_menu_search" android:title="@string/connect"/&gt; &lt;item android:id="@+id/discoverable" android:icon="@android:drawable/ic_menu_mylocation" android:title="@string/discoverable"/&gt; </code></pre> <p></p> <p>EDIT: Okay. I have been reading other entries in forum, and I see that there are devices that have not a menu key (to show options menu), and from 3+ version it is not required to have it. When I execute my application in an Android device less than 3 version, I have that physical button, and it works. In an Android device more than 3 version (I have one with 4+ version), that button does not exists, and there are no way to make the options menu visible. My question is... Do I have to put a button in screen on 3+ devices with no "physical menu button", to use it when I want to see the options menu???</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload