0

I want to create multiple list view inside ScrollView in Android. I have created the two list view inside ScrollView. In first List View each row contains a single text upto 5 rows will be presented. Whereas, in second list view each row will contains multiple paragraph text, ie, text very long . In my case I am unable to scroll the second list to view fully.

Is any other way available to handle this scenario ?

2 Answers2

0

Don't use the listview inside the scroll view, the listview is already scrollable . Using a ListView to make it not scroll is extremely expensive and goes against the whole purpose of ListView. You should NOT do this. Just use a LinearLayout instead.

Prabha Karan
  • 1,309
  • 3
  • 17
  • 35
  • Please refer this link for more details about why we should not use the listview inside the scroll view http://stackoverflow.com/questions/3495890/how-can-i-put-a-listview-into-a-scrollview-without-it-collapsing – Prabha Karan Feb 17 '17 at 11:25
0
Its Work in My RecyclerView try this:

<android.support.v4.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true"
    app:layout_behavior="@string/appbar_scrolling_view_behavior">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/rv_recycler_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</android.support.v4.widget.NestedScrollView>


You need to disable nested scrolling programatically. It doesn't seem to work correctly if done in xml.
recyclerView.setNestedScrollingEnabled(false);
Santosh Bachkar
  • 460
  • 4
  • 14