3

Is it true or not ? i want to scroll on the listview too inside my activity by using nested scroll view. Please help. Thanks in advance

<android.support.v4.widget.NestedScrollView
    android:id="@+id/login_form"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <LinearLayout
        android:id="@+id/insertkend_form"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <ListView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/listAksesoris">
            </ListView>

        </ScrollView>

   </LinearLayout>

</android.support.v4.widget.NestedScrollView>

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sugi Almantara
  • 119
  • 2
  • 10
  • This layout is odd - You have 3 layers of scrolling views (NestedScrollView, ScrollView & ListView). The big question is why do you need all of them? – Doron Yakovlev Golani May 09 '17 at 15:39
  • First i build a form in the `nestedscrollview` and in the `listview` i need to check some option using checkbox. i hope u understand what i mean. @DoronYakovlev-Golani – Sugi Almantara May 09 '17 at 15:48

1 Answers1

7

It's work now, just remove scrollview and add in listview android:nestedScrollingEnabled="true".

Sugi Almantara
  • 119
  • 2
  • 10