Commit Graph

13 Commits

Author SHA1 Message Date
Krzysztof Magiera
68a02d58d7 Android alpha compositing (#50)
This change adds an ability for screen container on Android to apply the correct mechanism for transparent layer blending. This is specifically important as screens are usually a complex views that may displays many layers and while transitioning often opacity is used to animate these. When we detect screen transitioning we (a) turn on offscreen alpha compositing (which makes the opacity being applied for the whole screen layer at once instead of making all the children semi-transparent) and also (b) turn on hardware layer that makes offscreen compositing render to GPU (which is both faster and consumes only GPU memory).

In addition to that change we also need to disable wrapping Screen's children with View, as in such a case opacity is applied on the underlying View instead of a Screen. That workaround has been added because of a bug in Animated library and fixed in RN 0.57+
2018-12-20 09:06:28 +01:00
Krzysztof Magiera
35120d9f8a Export native screen components so that they can be wrapped in reanimated view wrapper 2018-10-12 13:52:22 +02:00
Janic Duplessis
7ffdccd377 Use getViewManagerConfig when available to remove warning (#28) 2018-10-08 09:06:53 +02:00
Krzysztof Magiera
1a1b38f7d4 Rename screens.shared and screens.js to .native.js and .web.js to support react native web users properly 2018-10-02 20:35:42 +02:00
Bruno Lemos
4cf7b82a11 Fix for unsupported platforms (#22)
Fixes #13 for real
Fixes https://github.com/react-navigation/react-navigation/issues/5004

Use different `index.js` files for supported and unsupported platforms.

Tested on iOS and on an existing web project that uses react-navigation.

---

!['react-native' does not contain an export named 'requireNativeComponent'.](https://user-images.githubusercontent.com/619186/46323012-8164e300-c5c2-11e8-964e-b6f233776dab.png)

Necolas explained here that this import should not be on any file that runs on web: https://github.com/necolas/react-native-web/issues/507#issuecomment-307953785
2018-10-02 15:59:23 +02:00
Louis Lagrange
118068ed13 Minimal support for other platforms
Such as web, windows...
2018-09-24 22:06:40 +02:00
Cameron Knight
7a1668abca Add typescript definitions 2018-09-19 16:04:22 -07:00
Krzysztof Magiera
14e1334505 Export screensEnabled method to test if screens support is switched ON 2018-09-17 12:09:50 +02:00
Brent Vatne
73759537e3 Fix typo in error message and be specific about the README 2018-09-12 16:44:37 +02:00
Krzysztof Magiera
3feb754553 Filter out onComponentRef to avoid passing it to the fallback View component 2018-09-11 14:43:39 +02:00
Krzysztof Magiera
60511a7e90 Make it possible to enable/disable screens support with useScreen function 2018-09-11 11:29:47 +02:00
Krzysztof Magiera
d940a02fac Add compatibility layer for screens so that they can be used when native lib is not installed. 2018-09-07 13:45:20 +02:00
Krzysztof Magiera
31281d6b68 Initial commit. 2018-08-03 13:54:11 +02:00