wie erstellen Sie die Menüleiste am unteren Rand der Aktivität mit 4.0.3 SDK

Erstelle ich ein Menü in Version 4.0.3, gemäß der Dokumentation und zeigt immer Menüleiste am oberen Rand meiner Tätigkeit, aber ich möchte zeigen, dass es an der Unterseite meiner Tätigkeit so.Wie kann ich das erreichen?

wie erstellen Sie die Menüleiste am unteren Rand der Aktivität mit 4.0.3 SDK

Momentan benutze ich den folgenden code.

public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}

@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;
}}

menue.xlm

<menu xmlns:android="http://schemas.android.com/apk/res/android" >


<item
    android:id="@+id/weather"
    android:showAsAction="always|withText"
    android:icon="@drawable/ic_launcher"
    android:title="weather"/>
<item
    android:id="@+id/second"
    android:icon="@drawable/ic_launcher"
    android:showAsAction="always|withText"
    android:title="Home"/>

<item
    android:id="@+id/java"
    android:icon="@drawable/ic_launcher"
    android:showAsAction="always|withText"
    android:title="Java"/>

<item
    android:id="@+id/android"
    android:icon="@drawable/ic_launcher"
    android:showAsAction="always|withText"
    android:title="Android"/>
</menu>

Mainfest

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.example.bottom.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>

und zeigen die für die folgende Ausgabe.
wie erstellen Sie die Menüleiste am unteren Rand der Aktivität mit 4.0.3 SDK

Sie sind mit einem tablet-emulator. Ich bin werde bald eine Lösung aber nicht sicher, ob es richtig funktioniert auf den großen Bildschirmen.

InformationsquelleAutor Numan Ahmad | 2014-01-31

Schreibe einen Kommentar