-1

I do not want the header view to scroll and only need the body of the screen to scroll.

I have 2 screens. 1. Names.js 2. StudentsList.js

The content inside the Names.js is same as StudentsList.js. So I have used the Names.js as a component in StudentsList.js

Eg)Names.js

<View>
  <Header/>
 <keyboardAwareScrollView>
 </keyboardAwareScrollView>
</View>

Eg) StudentsList.js

 <View>
    {
      <View> 
      <Names>
      </Names>
      </View> 
     }
    </View>

Here the Names.js is working fine. But the StudentsList.js not shows the body of the screen and it only shows the Header section. Also If I change the View as ScrollView in StudentsList.js I can able to see the screen but the Header is scrolling

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
sejn
  • 2,040
  • 6
  • 28
  • 82

1 Answers1

0

I got solution for this and Added flex:1 for the view

sejn
  • 2,040
  • 6
  • 28
  • 82