From 044fca9561aa5eb1012415e6bf22643133d95dc2 Mon Sep 17 00:00:00 2001 From: Birkir Gudjonsson Date: Sat, 14 Jul 2018 19:40:52 -0400 Subject: [PATCH] LayoutAnimation on android --- appcenter-pre-build.sh | 2 +- src/index.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/appcenter-pre-build.sh b/appcenter-pre-build.sh index 9f6d881..e229163 100755 --- a/appcenter-pre-build.sh +++ b/appcenter-pre-build.sh @@ -62,7 +62,7 @@ if [ ! -z "$ANDROID_CODEPUSH_APPID" ]; then cd - else prepare_code_push - code-push codepush release-react $ANDROID_CODEPUSH_APPID android --outputDir build --description "$COMMIT_MESSAGE" + code-push release-react $ANDROID_CODEPUSH_APPID android --outputDir build --description "$COMMIT_MESSAGE" sentry-cli react-native codepush $ANDROID_CODEPUSH_APPID android ./build/CodePush --bundle-id $ANDROID_BUNDLE_ID curl -X PATCH "https://api.appcenter.ms/v0.1/apps/$ANDROID_CODEPUSH_APPID/builds/$APPCENTER_BUILD_ID" -H "accept: application/json" -H "X-API-Token: $APPCENTER_API_KEY" -H "Content-Type: application/json" -d "{ \"status\": \"cancelling\" }" fi diff --git a/src/index.ts b/src/index.ts index cb7042c..29b4156 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ import './utils/sentry'; -import { YellowBox, NetInfo, AsyncStorage } from 'react-native'; +import { YellowBox, NetInfo, AsyncStorage, UIManager, Platform } from 'react-native'; import { Navigation } from 'react-native-navigation'; import { Screens, startApp } from 'screens'; import UI from 'stores/UI'; @@ -23,6 +23,11 @@ if (__DEV__) { // (global as any).FormData = originalFormData ? originalFormData : FormData; } +// Enable LayoutAnimation on android +if (Platform.OS === 'android') { + UIManager.setLayoutAnimationEnabledExperimental(true); +} + // Register screens Screens.forEach((ScreenComponent, key) => Navigation.registerComponent(key, () => ScreenComponent));