Meh*_*bmp 4 android android-layout android-recyclerview nestedrecyclerview
我RecyclerViews在LinearLayout里面有2 个ScrollView:
<ScrollView
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:orientation="vertical"
android:padding="@dimen/few_value">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.foodjoo.fjco.customViews.BYekanFontText
android:id="@+id/market_category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:padding="@dimen/normal_plus_value"
android:text=" ?????? > ????? ???? ??? "
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead"
android:textColor="@color/light_black2" />
<android.support.v7.widget.RecyclerView
android:id="@+id/market_cat_recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<com.foodjoo.fjco.customViews.BYekanFontText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:padding="@dimen/normal_plus_value"
android:text="????? ???"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead"
android:textColor="@color/light_black2" />
<android.support.v7.widget.RecyclerView
android:id="@+id/market_hours_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)
两个回收商都有nestedScrollEnabledfla.
问题在于:当渲染布局时,第一个recyclerView将填充,屏幕底部的第二个recyclerView将不会显示所有项目,因为第一个高度!! 但它应该滚动,因为它们都在scrollView !!
所以有什么问题 ?
用NestedScrollView而不是ScrollView
并添加recyclerView.setNestedScrollingEnabled(false);到您的RecyclerView
| 归档时间: |
|
| 查看次数: |
2611 次 |
| 最近记录: |