Nach der Antwort in this question habe ich ersetzt ActionBarDrawerToggle
der Unterstützung v4-Bibliothek, die in der neuesten Aktualisierung (rev 21) veraltet ist mit der neuesten ActionBarDrawerToggle
von support-v7 library
.Ersetzen veraltete android.support.v4.app.ActionBarDrawerToggle mit support.v7 Version Ursache Schublade funktioniert nicht auf Jelly Bean
Jetzt arbeitet die Schublade auf Andrid Lollipop Emulator ohne Verwarnungen Warnung, aber wenn ich die App auf einem Jelly Bean realen Gerät testen keine Schublade und keine Toggle Schublade angezeigt wird.
Was zum Teufel mit diesem Support-Bibliothek-Update ankam? Wie kann ich dieses Problem beheben, ohne ein Downgrade auf die vorherige Version durchzuführen?
Hier mein Layout
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- content view -->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/drawer_text" />
</RelativeLayout>
<!-- nav drawer -->
<ListView
android:id="@+id/drawer"
android:layout_width="320dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#F3F3F4"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp" />
</android.support.v4.widget.DrawerLayout>
Können Sie Ihr Layout zeigen? new ActionBarDrawerToggle funktioniert gut für mich – nikis
siehe das Update auf die Frage – AndreaF
Bitte versuchen Sie Subclass von ActionBarActivity anstelle von FragmentActivity. – nikis