cesardeazevedo / react-native-collapsing-toolbar

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

Can't work with NavBarIcon #16

Closed rautram closed 6 years ago

cesardeazevedo commented 6 years ago

Hi, can you provide a description on what's going on? so i can help you.

Thanks

rautram commented 6 years ago

Thanks for this awesome library. My issue was solved by using the props of ToolbarAndroid, the issue was i couldn't find a way to deal with the navBarIcon. Can you suggest me the ios alternative of this library. Thanks for the quick response.

cesardeazevedo commented 6 years ago

The navBarIcon you mean the navIconName from the in the example?

<Icon.ToolbarAndroid
  iconColor='white'
  actions={[{ title: 'Show' }, { title: 'Hide' }]}
  navIconName={'md-menu'}
 />

If yes, they come from the react-native-vector-icons, which you have to install separately, and manually link the font icon files.

About the iOS solution, i only have seen react-native js based solutions, since there's no native component from apple that we can based on, you can just use you creativity and do something similar with Animated.View, there's a good article from App & Flow showing how you could implement it. https://medium.com/appandflow/react-native-scrollview-animated-header-10a18cb9469e

I recommend you creating a CollapsingHeader.android.js using this native component on android, and create a CollapsingHeader.ios.js and take the approach from the article.

rautram commented 6 years ago

Thanks the issue is now resolved.