cesardeazevedo / react-native-collapsing-toolbar

react-native wrapper for android CollapsingToolbarLayout
MIT License
295 stars 33 forks source link

Feedback based on my own CoordinatorLayout implementation #27

Open grahammendick opened 4 years ago

grahammendick commented 4 years ago

Thanks, your project helped me add a collapsing toolbar to my navigation library for React Native. I thought I’d let you know about a couple of things I learnt along the way.

  1. You don’t need your NestedScrollView component because React Native’s ScrollView component supports nested scrolling
  2. The CoordinatorLayout doesn’t work when the scrolled content is too short (height + toolbar height < screen height). It’s because React Native doesn’t bubble the touch event. I intercepted the touch event and manually applied the nested scrolling
A-ANing commented 4 years ago

Is IOS supported @grahammendick

grahammendick commented 4 years ago

Hey @ngxu, the CoordinatorLayout is native to Android. There's no equivalent UIKit version for iOS.

I built a Twitter example that shows it in action. There's a native collapsing toolbar on the home scene. On the notifications scene, the tabs pin to the top of the screen as the header scrolls off. This is all implemented by wrapping the native functionality on Android.