brentvatne / react-native-overlay

An <Overlay /> component that brings content inside to the front of the view regardless of its current position in the component tree.
639 stars 79 forks source link

Working with `Animated` #30

Open rahuljiresal opened 8 years ago

rahuljiresal commented 8 years ago

A perfect use for overlay is to slide it down from the top of the screen as a in-app notification. However, Overlay currently doesn't work with Animated from React Native. This feature would be really useful.

eyaleizenberg commented 8 years ago

:+1:

ivanbrens commented 8 years ago

@rahuljiresal @eyaleizenberg So I got animations working. I wrapped the Overlay's content in a and animated it using

 style={{top: -DEVICE_HEIGHT}} 

to bring the entire view off the screen. It still preserves the random height of the toast.

This is with LayoutAnimation easeInEaseOut:

niftylettuce commented 8 years ago

@ivanbrens @rahuljiresal @eyaleizenberg Please submit a pull request or close this issue? Not sure if you intend to add documentation for this? Maybe make a section in the Readme called Animations? And you can document what you did there?

niftylettuce commented 8 years ago

See #36 - we will be refactoring this soon to support Android/iOS and not have any issues here, there will no longer be the XCode integration needed