Ich habe eine Aktivität gemacht, die ein ListView und ein Fragment enthält (mit einem DrawerLayout).DrawerLayout auf Fragment blendet ListView
Activity.xml:
<?xml version="1.0" encoding="utf-8"?>
<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:background="#ddffff"
>
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/lista"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
<fragment
android:id="@+id/fragment1"
android:name=".Fragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
Die Listenansicht nicht angezeigt. Ich denke, die Listenansicht ist wegen des Fragments versteckt. Ich weiß nicht warum.
Sowohl die Listenansicht als auch das Fragment werden im Vollbildmodus angezeigt. Das Fragment ist oben, also deckt es die Listenansicht ab. Wie soll die Listview und das Fragment auf dem Bildschirm positioniert werden? – Francesc
Ich möchte, dass die Listenansicht hinter dem Drawerlayout liegt. So: http://blog.teamtreehouse.com/wp-content/uploads/2015/02/nav_drawer_final.gif – tomss