Open luoluoqi0898 opened 4 years ago
recycleview嵌套scrollview后,recycleview的高度测量值为0,求解。不使用tangram是正常的,布局如下:
<ScrollView android:id="@+id/scrollView" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@android:color/transparent" android:scrollbars="none"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#f7faff" android:orientation="vertical"> <View android:layout_width="match_parent" android:background="@color/redText" android:layout_height="1000dp"/> <android.support.v7.widget.RecyclerView android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="wrap_content"/> </LinearLayout> </ScrollView>
recycleview嵌套scrollview后,recycleview的高度测量值为0,求解。不使用tangram是正常的,布局如下: