Commit Graph

99 Commits

Author SHA1 Message Date
scottmas
a0e7dd990b Update
Tweak
2019-02-25 15:06:50 -07:00
scottmas
36aa843aaf Tweak readme
Tweak readme
2019-02-25 14:20:43 -07:00
scottmas
e96f4954db Update docs
The docs do not state that react-native-screens is also used by default for the tab and drawer navigators. I updated the docs to include that. I didn't see support in any of the other navigators that I looked at, but if there are any others, we should update the documentation for them as well.
2019-02-25 08:41:22 -07:00
Michel dos Santos Kuguio
f28f889f98 update to gradle 4.10.1 or high (#60)
Add suport to gradle 4.10.1 or high!
The new version of android studio 3.3 recommendete to update gradle project to 4.10.1 

> To take advantage of the latest features, improvements, and security fixes, we strongly recommend that you update the Android Gradle plugin to version 3.3.0 and Gradle to version 4.10.1. [Release notes ](https://developer.android.com/studio/releases/gradle-plugin) 

>Android plugin 3.2.0 and higher now support building the Android App Bundle—a new upload format that defers APK generation and signing to compatible app stores, such as Google Play. With app bundles, you no longer have to build, sign, and manage multiple APKs, and users get smaller, more optimized downloads. [Learn more](https://developer.android.com/guide/app-bundle/?utm_source=android-studio)

but if the upgrade to the new Android gradle warning come up, becouse  was obsoleted 

> WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.

> It will be removed at the end of 2019.
> For more information, [see ](https://d.android.com/r/tools/task-configuration-avoidance.)
> To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.


Changelog:
----------
[Android] [Deprecated] - fix warinings obsolete to update to gradle 4.10.1 or high

Test Plan:
----------
change gradle-wrapper.proprerties:
`- distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip`
`+ distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip`

and in build.gradle

` - classpath 'com.android.tools.build:gradle:3.2.0'`
`+ classpath 'com.android.tools.build:gradle:3.3.0'`

for warnnings starts, use this change and fix the problem! =)
2019-02-12 13:09:47 +01:00
Alain Hufkens
8bfc363cf7 Add tvOS target (#65)
I added a RNScreens-tvOS Target. It doesn't have anything that doesn't work on tvOS.
it's working in our project now.
2019-02-12 13:09:22 +01:00
Krzysztof Magiera
c680c4fd91 Bump version -> alpha.22 1.0.0-alpha.22 2019-01-15 16:30:28 +01:00
Krzysztof Magiera
c741acf7cc Unwrap Context in order to retrieve Activity subclass (#59)
This fixes crash on Expo client which is wrapping Activity prior to passing it as a context to the root view.

After my recent change in the logic on how we access main activity we know extract the reference to it using `getContext` from the root view. Previously we were using `getTopLevelActivity` which wasn't working well in the cases where other non-react-native activities were transitioning in or out. The new approach however turned out not to be the best as for example expo client does not pass activity instance as a context directly to the root view. Instead the activity class is wrapped in ContextThemeWrapper ([see it here](41458d1de9/android/expoview/src/main/java/versioned/host/exp/exponent/ReactUnthemedRootView.java (L13))).

We now try to unwrap the context if it is not a fragment activity using `getBaseContext`

This fixes https://github.com/expo/expo/issues/3191
2019-01-15 16:29:46 +01:00
Krzysztof Magiera
11906bfddf Bump version -> alpha.21 2019-01-07 11:11:45 +01:00
Krzysztof Magiera
742df91d39 Restore view interaction when container changes from 0 active to 1 active (#56)
Previously we weren't triggering transaction finish when going from none active screens to 1 active screen. This turns out to be the case in tab navigator where for a sub-frame moment the active state changes for the current screen to `NO` and then new screen isn't active yet.

Fixes #53
2019-01-07 11:11:21 +01:00
Krzysztof Magiera
9e151fe6fb Bump version -> alpha.20 2019-01-04 16:44:37 +01:00
Krzysztof Magiera
c0b73545ff Avoid ReactContext.getCurrentActivity for accessing FragmentActivity 2019-01-04 16:44:01 +01:00
Krzysztof Magiera
0f6e0c123d Bump version -> alpha.19 2018-12-20 11:03:13 +01:00
Krzysztof Magiera
369987f68e Make sure we access fragment manager only when view is attached (activity is foregrounded) (#52)
This change makes us reach to fragment manager only when screen container is attached to window (and therefore we are sure that the current activity is react one). The problem reported in #33 was due to the fact we'd do that when container is instantiated which does not necessarily mean that react activity is in foreground. We didn't need to actually access fragment manager while not in foreground so this change removes fragmentManager as a member and we get it directly from context when needed.

Supposedly fixes #33
2018-12-20 11:02:39 +01:00
Krzysztof Magiera
675852f95b Bump version -> alpha.18 2018-12-20 10:06:40 +01:00
Krzysztof Magiera
ac719105ac Android: Disable touch interaction on screens that are transitioning (#51) 2018-12-20 10:02:56 +01:00
Krzysztof Magiera
ed14cd3a87 Add tabs+stack Example 2018-12-20 09:16:56 +01:00
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
4dd751811a Ignore pointerEvent set via react props (#49)
This is a follow up to #48 which makes Screen component ignore setting of pointerEvents. As it turns out react-navigation tries to set this setting and in addition to handling it manually we also need to prevent it to be set via React prop.
2018-12-20 08:46:34 +01:00
Krzysztof Magiera
5893d9a8a7 Restore first responder of view controller when screen reactivates (#48)
This change automates first responder restoring when screen is deactivated and the activated back (e.g. when we push new screen on top and then go back). In addition we disable pointerEvent setting for the Screen component as changes made to that prop would cause underlying views to resign responder before we can remember it. Because of that we add an automatic handling for pointer events for the Screen component that disables all touch interactions when screen is transitioning.
2018-12-20 08:44:01 +01:00
Krzysztof Magiera
5dadab9aa6 Trigger moveToWindow:nil call when screen animation starts to mimick UINavController behavior (#47)
With this change in the screens that are being transitioned get detach+attach events similarily to how it is done in UINavigationController. This allows views underneath to get notified that the transition is started and react to it when necessary (e.g. hide keyboard)
2018-12-20 08:39:11 +01:00
Krzysztof Magiera
5cd96cdd1b Upgrade Example project 2018-12-18 13:14:43 +01:00
Tycho Tatitscheff
bf0cca0bae Update build.gradle (#45)
gradle 2.2.1 is no more resolved on maven. This resuts in a build error like:

```
* What went wrong:
A problem occurred configuring project ':react-native-image-picker'.
> Could not resolve all artifacts for configuration ':react-native-image-picker:classpath'.
   > Could not find any matches for com.android.tools.build:gradle:2.2.+ as no versions of com.android.tools.build:gradle are available.
     Searched in the following locations:
       - https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml
       - https://jcenter.bintray.com/com/android/tools/build/gradle/
     Required by:
         project :react-native-image-picker
```

RNSvg already fix here : e48dbdb08b (diff-c31b32364ce19ca8fcd150a417ecce58)
2018-12-18 12:53:56 +01:00
Krzysztof Magiera
1cd165e763 Use react-navigation v3 2018-12-13 20:14:01 +01:00
Krzysztof Magiera
7e8337b059 Bump version -> alpha.17 2018-12-05 08:20:06 +01:00
Guillaume Duveau
68424adc39 Support project-wide properties, replace deprecated configuration (#41) 2018-12-05 08:19:35 +01:00
Krzysztof Magiera
a2046da40d Bump version -> alpha.16 2018-11-05 10:37:35 +01:00
Krzysztof Magiera
f57223659c Fix issue with alert/modal dismiss when pushing new screens 2018-11-05 10:37:16 +01:00
Krzysztof Magiera
88ba15f86d Fix project config to make it possible to run on device 2018-11-05 10:36:24 +01:00
sebryu
2af7141beb Updated name of library in readme file (#37) 2018-10-25 13:03:34 +02:00
Krzysztof Magiera
c32b4e4c11 Bump version -> alpha.15 2018-10-12 13:52:45 +02: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
Krzysztof Magiera
5763e7c745 Update example config for Android to make it build after recent screens package renaming 2018-10-11 12:51:06 +02:00
Krzysztof Magiera
214ded0152 Fix example app to make it compile with new RN 2018-10-11 12:46:16 +02:00
Janic Duplessis
ece5b6ef6a Use commitAllowingStateLoss instead of commit (#24)
This fixes a crash I saw in production on Android `java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState`. The fix is based on the comment here https://stackoverflow.com/questions/7575921/illegalstateexception-can-not-perform-this-action-after-onsaveinstancestate-wit.

The crash stopped happening since deploying this fix.

Fixes #20
2018-10-11 12:44:34 +02:00
Scott MacLellan
29022684cc Fixing a minor typo (#25)
Updating a really minor typo in the readme: `s/enojy/enjoy`.

Here it is in context:

```markdown
3. That's all 🎉 – enjoy faster navigation in your Expo app. Keep in mind screens are in pretty early phase so please report if you discover some issues.
```
2018-10-08 09:07:14 +02:00
Janic Duplessis
7ffdccd377 Use getViewManagerConfig when available to remove warning (#28) 2018-10-08 09:06:53 +02:00
Thibault Malbranche
0daa7e2ef7 Rename RNScreen to RNScreens to stay consistent (#27) 2018-10-08 09:06:12 +02:00
Krzysztof Magiera
6291a98bbc Bump version -> alpha.14 2018-10-02 20:36:13 +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
Krzysztof Magiera
27f235fc9a Bump version -> alpha.13 2018-10-02 16:00:41 +02:00
Janic Duplessis
5e41470b4f Fix typo in updateContainer method definition (#23) 2018-10-02 16:00:13 +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
Krzysztof Magiera
75b62b487f Merge pull request #19 from kelset/patch-1
Update README.md
2018-10-01 19:08:55 +02:00
Lorenzo Sciandra
b6c83acc6b Update README.md
fix for crash
2018-09-27 12:24:19 +01:00
Krzysztof Magiera
8d2463faed Update README.md 2018-09-27 11:42:51 +02:00
Krzysztof Magiera
b9d84e7f22 Update README.md 2018-09-25 09:30:39 +02:00
Krzysztof Magiera
91cb2bd423 Update README.md 2018-09-25 09:26:01 +02:00
Krzysztof Magiera
cf695ffe82 Merge pull request #16 from Minishlink/patch-1
Minimal support for other platforms
2018-09-25 08:28:53 +02:00
Louis Lagrange
118068ed13 Minimal support for other platforms
Such as web, windows...
2018-09-24 22:06:40 +02:00
Krzysztof Magiera
b9938ada36 Merge pull request #14 from ckknight/types
Add typescript definitions
2018-09-24 08:46:25 +02:00