ネストされたリサイクラービューの高さはコンテンツをラップしません
書籍のコレクション(プレイリストなど)を管理するアプリケーションがあります。 垂直方向のRecyclerViewでコレクションのリストを表示し、各行の内側に水平方向のRecyclerViewの本のリストを表示したいと思います。 内側の水平方向のRecyclerViewのlayout_heightを300dpに設定すると、正しく表示されますが、wrap_contentに設定すると、何も表示されません。 垂直表示と水平表示を切り替えるためにレイアウトマネージャーをプログラムで変更できるようにしたいので、wrap_contentを使用する必要があります。 私が間違っていることを知っていますか? 私のフラグメントのレイアウト: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white"> <com.twibit.ui.view.CustomSwipeToRefreshLayout android:id="@+id/swipe_container" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.v7.widget.RecyclerView android:id="@+id/shelf_collection_listview" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingTop="10dp"/> </LinearLayout> </com.twibit.ui.view.CustomSwipeToRefreshLayout> </LinearLayout> コレクション要素のレイアウト: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#FFF"> <!-- Simple Header --> </RelativeLayout> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:text="@string/empty_collection" …