0

I have a NestedScrollView inside a ScrollView having Relative layout as the parent view. Now, when i run my app on Android 6.0 or API23 its running smoothly and the NestedScrollView is also scrolling. But, when i run my app on the Android 4.2.2 or API17 then everything is working fine except the NestedScrollView. I don't know why this is happening. I went through other SO questions but none was dealing with the kind of problem i have..

This is my layout:-

<ScrollView>

    <Other Views/>
    <Other Views/>

    <NestetScrollView>

        <CustomTextView/>

   </NestetScrollView>

</ScrollView>

Any help is appreciated.

beginner
  • 528
  • 4
  • 16

1 Answers1

0

Try changing it into this format and see if it works:

<NestetScrollView>

    <Other Views/>
    <Other Views/>

    <ScrollView>

        <CustomTextView/>

   </ScrollView>

</NestetScrollView>
Suhayl SH
  • 1,213
  • 1
  • 11
  • 16
  • thanx!! i changed the main scrollview to nestedscroll view. Now my layout is But can you explain why this happened? – beginner Apr 25 '17 at 08:35
  • Nested scroll view makes sure that both the parent and the child view are scrollable. (Child view scrollable within a scrollable parent). Thus NestedScrollView should always be the parent. – Suhayl SH Apr 25 '17 at 08:43