Monday, May 29, 2017

React Native: Animate shrinking header with tabs

Leave a Comment

Goal

Im trying to create a view with an animated shrinking header with a tabview that contains tabs with scrolling content. See Image.

Setup

I'm using react-navigation with a TabNavigator. The header is a component with a fixed height, currently above the TabNavigator. The header is fixed above the tabs all the time taking precious space.

Tried Approaches

  • I've tried Janic Duplessis Blog Post but I can't get it to work because of the tabs.

  • I've also tried implementing it with two ScrollView/FlatList: One wrapped around the whole view and one wrapping the content but I can't get react native to propagate the scroll edge is reached.

The desired effect is the same as in the Google Play store.

Mobile Screenshot Google play

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment