だから、まず第一に、あなたのデザインのものを使うべきだと私は知っていますが、それは実際に使用しActionBar
たりActionBarSherlock
、新しいアプリケーションに使用したりするためのより良いオプションです. しかし、あなたの質問に正しい答えを出すためには、ホームと戻るボタンの横にある下部のシステム バーにソフトウェア メニュー ボタンを表示する前に、いくつかのことを行う必要があります。
まず、いつものようにメニューを含めます。
@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;
}
変更する必要がある 2 番目のことは、次のAndroidManifest.xml
とおりです。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="10" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" >
<activity
android:name="com.example.test.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
この行を見てください:
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="10" />
これは魔法が起こる場所です。targetSdkVersion
10 より大きい値を設定すると、アプリがハードウェア メニュー ボタンのないデバイスをサポートし、おそらくActionBar
または他の方法で使用できることを意味します。
上記のようにすべてを行うと、Nexus4/Nexus7 の画面が次のようになります。

お役に立てれば!
PS。繰り返しになりますが、アプリケーションを構築するには、最新の利用可能な設計ガイドラインとコーディングのベスト プラクティスを使用することを検討する必要があります。