Ich verwende eine RecyclerView
als Kind eines anderen RecyclerView
, aber wenn ich Daten zu zweiten RecyclerView
hinzufügen zeigt es nichts. Ich sollte sagen, wenn ich die Höhe der Sekunde RecyclerView
auf (z. B. 100dp) setze zeigt es einige Inhalte davon.RecylerView Höhe nicht gefüllt, wenn in einem anderen RecyclerView
Wie soll ich das Problem lösen?
-main xml
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view1"
android:layout_margin="@dimen/activity_horizontal_margin"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/progressBar3"
android:visibility="gone"
android:background="#1E88E5"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
Artikel xml
<RelativeLayout android:clickable="true" android:id="@+id/lla2" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:text="Medium Text" android:id="@+id/textView3" android:layout_alignParentTop="true" android:layout_marginTop="@dimen/activity_horizontal_margin" android:layout_marginBottom="@dimen/activity_horizontal_margin" android:layout_alignRight="@+id/view13" android:layout_alignEnd="@+id/view13" android:layout_toEndOf="@+id/ib2" android:layout_alignLeft="@+id/view13" android:layout_alignStart="@+id/view13" android:layout_toRightOf="@+id/ib2" /> <View android:layout_width="match_parent" android:layout_height="1dp" android:background="@android:color/darker_gray" android:id="@+id/view13" android:layout_margin="@dimen/activity_horizontal_margin" android:layout_below="@+id/textView3" android:layout_toRightOf="@+id/ib2" android:layout_toEndOf="@+id/ib2" /> <android.support.v7.widget.RecyclerView android:id="@+id/recycler_view6" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginRight="@dimen/activity_horizontal_margin" android:layout_marginEnd="@dimen/activity_horizontal_margin" android:layout_marginBottom="@dimen/activity_horizontal_margin" android:layout_alignLeft="@+id/textView3" android:layout_alignStart="@+id/textView3" android:layout_below="@+id/view13" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:src="@drawable/ic_more_vert_black_24dp" android:alpha="0.5" android:id="@+id/ib2" android:layout_marginTop="@dimen/activity_horizontal_margin" android:layout_alignTop="@+id/textView3" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:src="@drawable/note" android:layout_marginTop="@dimen/activity_horizontal_margin" android:id="@+id/imageButton" android:alpha="0.1" android:layout_below="@+id/ib2" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:src="@drawable/bookmark" android:alpha="0.5" android:id="@+id/imageButton2" android:layout_below="@+id/imageButton" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /> </RelativeLayout>
bitte posten Sie die XML. –
@LucasPaolillo Ich postete xml – Ali