Ich versuche, diese Ansicht zu erstellen:RecyclewView mit verschachtelten Grid Höhe einstellen
Es ist Rerecyclew
mit einem Gridview
für jedes Element. Also, wenn Sie das Plus-Element drücken, muss ich ein neues Element an die Gridview
hinzufügen und die RecyclewView
Artikel Höhe anpassen.
Aber ich kann es nicht mit einer wrap_content
machen und ich weiß nicht warum.
Aktivität Layout-
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_scenes"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
</LinearLayout>
RecyclewView Artikel
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<GridView
android:id="@+id/gv_scene_items"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:numColumns="3"
android:gravity="center"
android:columnWidth="50dp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#eaeaea" />
</LinearLayout>
Grid Artikel (nur zum Beispiel)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="55dp"
android:layout_height="55dp"
android:background="@color/liloColorBlue">
</LinearLayout>
Können Sie mir helfen, die Beispielansicht zu erhalten?
Vielen Dank.
leider nicht funktioniert –