From b185a90f81792081debfd2abd85eb48fe2e32567 Mon Sep 17 00:00:00 2001 From: Brent Vatne Date: Mon, 7 Dec 2015 10:15:01 -0800 Subject: [PATCH] Add Android example, update example to 0.16.0, fix 0.16.0 Android compat --- .gitignore | 1 + Examples/AnimatedGradient/.flowconfig | 63 +++++++++++++ Examples/AnimatedGradient/.watchmanconfig | 1 + .../project.pbxproj | 60 ++++++------ .../AnimatedGradient.xcscmblueprint | 30 ++++++ .../UserInterfaceState.xcuserstate | Bin 0 -> 13985 bytes .../xcschemes/xcschememanagement.plist | 22 +++++ .../AnimatedGradient/android/app/build.gradle | 79 ++++++++++++++++ .../android/app/proguard-rules.pro | 60 ++++++++++++ .../AnimatedGradient/android/app/react.gradle | 87 ++++++++++++++++++ .../android/app/src/main/AndroidManifest.xml | 23 +++++ .../com/animatedgradient/MainActivity.java | 81 ++++++++++++++++ .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3418 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2206 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4842 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 7718 bytes .../app/src/main/res/values/strings.xml | 3 + .../app/src/main/res/values/styles.xml | 8 ++ .../AnimatedGradient/android/build.gradle | 23 +++++ .../AnimatedGradient/android/settings.gradle | 6 ++ Examples/AnimatedGradient/iOS/AppDelegate.m | 3 +- Examples/AnimatedGradient/iOS/Info.plist | 5 + Examples/AnimatedGradient/index.android.js | 63 +++++++++++++ Examples/AnimatedGradient/index.ios.js | 11 +-- Examples/AnimatedGradient/package.json | 5 +- index.android.js | 3 +- index.ios.js | 6 +- 27 files changed, 600 insertions(+), 43 deletions(-) create mode 100644 Examples/AnimatedGradient/.flowconfig create mode 100644 Examples/AnimatedGradient/.watchmanconfig create mode 100644 Examples/AnimatedGradient/AnimatedGradient.xcodeproj/project.xcworkspace/xcshareddata/AnimatedGradient.xcscmblueprint create mode 100644 Examples/AnimatedGradient/AnimatedGradient.xcodeproj/project.xcworkspace/xcuserdata/brent.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 Examples/AnimatedGradient/AnimatedGradient.xcodeproj/xcuserdata/brent.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 Examples/AnimatedGradient/android/app/build.gradle create mode 100644 Examples/AnimatedGradient/android/app/proguard-rules.pro create mode 100644 Examples/AnimatedGradient/android/app/react.gradle create mode 100644 Examples/AnimatedGradient/android/app/src/main/AndroidManifest.xml create mode 100644 Examples/AnimatedGradient/android/app/src/main/java/com/animatedgradient/MainActivity.java create mode 100644 Examples/AnimatedGradient/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 Examples/AnimatedGradient/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 Examples/AnimatedGradient/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 Examples/AnimatedGradient/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 Examples/AnimatedGradient/android/app/src/main/res/values/strings.xml create mode 100644 Examples/AnimatedGradient/android/app/src/main/res/values/styles.xml create mode 100644 Examples/AnimatedGradient/android/build.gradle create mode 100644 Examples/AnimatedGradient/android/settings.gradle create mode 100644 Examples/AnimatedGradient/index.android.js diff --git a/.gitignore b/.gitignore index 28ec8f2..b6f03c7 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ gradlew.bat gradle/ *.properties *.iml +npm-debug.log diff --git a/Examples/AnimatedGradient/.flowconfig b/Examples/AnimatedGradient/.flowconfig new file mode 100644 index 0000000..8eadd33 --- /dev/null +++ b/Examples/AnimatedGradient/.flowconfig @@ -0,0 +1,63 @@ +[ignore] + +# We fork some components by platform. +.*/*.web.js +.*/*.android.js + +# Some modules have their own node_modules with overlap +.*/node_modules/node-haste/.* + +# Ugh +.*/node_modules/babel.* +.*/node_modules/babylon.* +.*/node_modules/invariant.* + +# Ignore react and fbjs where there are overlaps, but don't ignore +# anything that react-native relies on +.*/node_modules/fbjs-haste/.*/__tests__/.* +.*/node_modules/fbjs-haste/__forks__/Map.js +.*/node_modules/fbjs-haste/__forks__/Promise.js +.*/node_modules/fbjs-haste/__forks__/fetch.js +.*/node_modules/fbjs-haste/core/ExecutionEnvironment.js +.*/node_modules/fbjs-haste/core/isEmpty.js +.*/node_modules/fbjs-haste/crypto/crc32.js +.*/node_modules/fbjs-haste/stubs/ErrorUtils.js +.*/node_modules/react-haste/React.js +.*/node_modules/react-haste/renderers/dom/ReactDOM.js +.*/node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js + +# Ignore commoner tests +.*/node_modules/commoner/test/.* + +# See https://github.com/facebook/flow/issues/442 +.*/react-tools/node_modules/commoner/lib/reader.js + +# Ignore jest +.*/node_modules/jest-cli/.* + +# Ignore Website +.*/website/.* + +[include] + +[libs] +node_modules/react-native/Libraries/react-native/react-native-interface.js + +[options] +module.system=haste + +munge_underscores=true + +module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' +module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub' + +suppress_type=$FlowIssue +suppress_type=$FlowFixMe +suppress_type=$FixMe + +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy + +[version] +0.18.1 diff --git a/Examples/AnimatedGradient/.watchmanconfig b/Examples/AnimatedGradient/.watchmanconfig new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/Examples/AnimatedGradient/.watchmanconfig @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/Examples/AnimatedGradient/AnimatedGradient.xcodeproj/project.pbxproj b/Examples/AnimatedGradient/AnimatedGradient.xcodeproj/project.pbxproj index 12ddd43..49a2a23 100644 --- a/Examples/AnimatedGradient/AnimatedGradient.xcodeproj/project.pbxproj +++ b/Examples/AnimatedGradient/AnimatedGradient.xcodeproj/project.pbxproj @@ -7,8 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 00481BE81AC0C86700671115 /* libRCTWebSocketDebugger.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00481BE61AC0C7FA00671115 /* libRCTWebSocketDebugger.a */; }; - 00481BEA1AC0C89D00671115 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 00481BE91AC0C89D00671115 /* libicucore.dylib */; }; 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; }; 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E61ABCBA2D00DB3ED1 /* libRCTAdSupport.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302B41ABCB8E700DB3ED1 /* libRCTAdSupport.a */; }; @@ -22,17 +20,11 @@ 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; + 84B328261C16040D00DE4E08 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B328251C1603EE00DE4E08 /* libRCTWebSocket.a */; }; BB6109EF1AD326EA00563A76 /* libBVLinearGradient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BB6109EE1AD326E400563A76 /* libBVLinearGradient.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 00481BE51AC0C7FA00671115 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; - remoteInfo = RCTWebSocketDebugger; - }; 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; @@ -89,6 +81,13 @@ remoteGlobalIDString = 58B5119B1A9E6C1200147676; remoteInfo = RCTText; }; + 84B328241C1603EE00DE4E08 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 84B328201C1603ED00DE4E08 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3C86DF461ADF2C930047B81A; + remoteInfo = RCTWebSocket; + }; BB6109ED1AD326E400563A76 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BB6109E91AD326E400563A76 /* BVLinearGradient.xcodeproj */; @@ -99,8 +98,6 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocketDebugger.xcodeproj; path = "node_modules/react-native/Libraries/RCTWebSocketDebugger/RCTWebSocketDebugger.xcodeproj"; sourceTree = ""; }; - 00481BE91AC0C89D00671115 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; }; 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = iOS/main.jsbundle; sourceTree = ""; }; 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAdSupport.xcodeproj; path = "node_modules/react-native/Libraries/AdSupport/RCTAdSupport.xcodeproj"; sourceTree = ""; }; @@ -117,6 +114,7 @@ 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iOS/main.m; sourceTree = ""; }; 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; + 84B328201C1603ED00DE4E08 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; BB6109E91AD326E400563A76 /* BVLinearGradient.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = BVLinearGradient.xcodeproj; path = "node_modules/react-native-linear-gradient/BVLinearGradient.xcodeproj"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -125,9 +123,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 00481BEA1AC0C89D00671115 /* libicucore.dylib in Frameworks */, + 84B328261C16040D00DE4E08 /* libRCTWebSocket.a in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */, - 00481BE81AC0C86700671115 /* libRCTWebSocketDebugger.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 00C302E61ABCBA2D00DB3ED1 /* libRCTAdSupport.a in Frameworks */, 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, @@ -142,14 +139,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 00481BDC1AC0C7FA00671115 /* Products */ = { - isa = PBXGroup; - children = ( - 00481BE61AC0C7FA00671115 /* libRCTWebSocketDebugger.a */, - ); - name = Products; - sourceTree = ""; - }; 00C302A81ABCB8CE00DB3ED1 /* Products */ = { isa = PBXGroup; children = ( @@ -223,6 +212,7 @@ 832341AE1AAA6A7D00B99B32 /* Libraries */ = { isa = PBXGroup; children = ( + 84B328201C1603ED00DE4E08 /* RCTWebSocket.xcodeproj */, BB6109E91AD326E400563A76 /* BVLinearGradient.xcodeproj */, 146833FF1AC3E56700842450 /* React.xcodeproj */, 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, @@ -232,8 +222,6 @@ 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, - 00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */, - 00481BE91AC0C89D00671115 /* libicucore.dylib */, ); name = Libraries; sourceTree = ""; @@ -265,6 +253,14 @@ name = Products; sourceTree = ""; }; + 84B328211C1603ED00DE4E08 /* Products */ = { + isa = PBXGroup; + children = ( + 84B328251C1603EE00DE4E08 /* libRCTWebSocket.a */, + ); + name = Products; + sourceTree = ""; + }; BB6109EA1AD326E400563A76 /* Products */ = { isa = PBXGroup; children = ( @@ -347,8 +343,8 @@ ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; }, { - ProductGroup = 00481BDC1AC0C7FA00671115 /* Products */; - ProjectRef = 00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */; + ProductGroup = 84B328211C1603ED00DE4E08 /* Products */; + ProjectRef = 84B328201C1603ED00DE4E08 /* RCTWebSocket.xcodeproj */; }, { ProductGroup = 146834001AC3E56700842450 /* Products */; @@ -363,13 +359,6 @@ /* End PBXProject section */ /* Begin PBXReferenceProxy section */ - 00481BE61AC0C7FA00671115 /* libRCTWebSocketDebugger.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTWebSocketDebugger.a; - remoteRef = 00481BE51AC0C7FA00671115 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -426,6 +415,13 @@ remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 84B328251C1603EE00DE4E08 /* libRCTWebSocket.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTWebSocket.a; + remoteRef = 84B328241C1603EE00DE4E08 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; BB6109EE1AD326E400563A76 /* libBVLinearGradient.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; diff --git a/Examples/AnimatedGradient/AnimatedGradient.xcodeproj/project.xcworkspace/xcshareddata/AnimatedGradient.xcscmblueprint b/Examples/AnimatedGradient/AnimatedGradient.xcodeproj/project.xcworkspace/xcshareddata/AnimatedGradient.xcscmblueprint new file mode 100644 index 0000000..29931f9 --- /dev/null +++ b/Examples/AnimatedGradient/AnimatedGradient.xcodeproj/project.xcworkspace/xcshareddata/AnimatedGradient.xcscmblueprint @@ -0,0 +1,30 @@ +{ + "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "C854EADF02A501C352F1C31CE594A07F661B2A78", + "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { + + }, + "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { + "16CE14A2D81CCE323D476004724594AEF6B38C0A" : 0, + "C854EADF02A501C352F1C31CE594A07F661B2A78" : 0 + }, + "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "439833FD-A58F-4243-8AD6-E877313B0F6A", + "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { + "16CE14A2D81CCE323D476004724594AEF6B38C0A" : "", + "C854EADF02A501C352F1C31CE594A07F661B2A78" : "react-native-linear-gradient" + }, + "DVTSourceControlWorkspaceBlueprintNameKey" : "AnimatedGradient", + "DVTSourceControlWorkspaceBlueprintVersion" : 204, + "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Examples\/AnimatedGradient\/AnimatedGradient.xcodeproj", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:exponentjs\/react-native.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "16CE14A2D81CCE323D476004724594AEF6B38C0A" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:brentvatne\/react-native-linear-gradient.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "C854EADF02A501C352F1C31CE594A07F661B2A78" + } + ] +} \ No newline at end of file diff --git a/Examples/AnimatedGradient/AnimatedGradient.xcodeproj/project.xcworkspace/xcuserdata/brent.xcuserdatad/UserInterfaceState.xcuserstate b/Examples/AnimatedGradient/AnimatedGradient.xcodeproj/project.xcworkspace/xcuserdata/brent.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..ffc02fe1216a9dc63d190191c8901b41078fe21f GIT binary patch literal 13985 zcmc(F33!vm*8ePTmn3bIG-;cqZMLROY14)7h(K4Ul!A0&r=)EtkB z+JSbWr_gTn9NLTap_kD?^fr12y^G#M@1qaUr|2_u7JZF=KtH0N&~F%Fj3aO~R$w(Y zU?U!YGjJZx$Aj^ecnBVf8*n2YhsWaycp{#JC*vu2DsIJgJQKI$*?10~i@WiBd@H^U z-;P(|JMe0JCtics;>~yq-ijZ<58{XLcDxfmhyQ_}#|Q8$_!NE{zk}b!@8S3H2l!+B z3H}s+fxpJz;vew82_l#f5=Ej(43QEUk&`&0CdtG|OvFmE$Uss|O30OD2q_~~NuaT4Feex0cjGQ5#le6So@&oxd`HjXb z^eOrbeV*>6hv=*HFnx`_Nl(zX=zH`u{fM5U-_Y~)TlyXSp8k{mK!2gX(%(24C+A{0 z1*hcVxOgssQ*mle!)duhE{RLyEL=J_fE&mS=C0(1a6`FaTq#$^)o`P@T5dEqft$!p z;wE#`xi)SF*UoivjPr5}xkcQK+){2iw}QKcyS*W$qpQ9B7!n~dlAtIgMX}>*>#}Cr zyWJDv(=X+XDJ|_bx4Q>LqZmdQ?LjgmXB>Ns2t~X&2)F#TI?0hmabX$4o_g>c$AD%x1t23LTaQz zT9k;ASQrau5iF94n3zenA|28r1FS%eQjnQNv1lfRwL~y2D`x3adFqaiR_B~5mu;54 zNoIhC(XLjz%ibECwcgfT?(FcmobBzP#!a#z{g)Kd*_26q@YyP9M=7+%`q0kpXE zlA2^{o}h0V^-gDdv&~iQZgjXE&F!!wRbQX2xh$kBZr;3{Onv_RO#M9IH+(HB%9}s` zsP9a3(7=sI4Sb3@itfVQ>{Pi3pa<8--eY~9W-Pm@dr`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6)~hSP?R4WAmmG@Lb@Gn_a4 zW{fb3j8R6ZG1jOw>WoIC*=R9l7_G)^<5fnxkr|g6R~m0O-eJ7cxYfABxYPKQ@oD3J zw{_XnNgr)O5mh%Ji=3ebZN_uT9^WzDsFMxi;mx zl=&$vWl_qKlv`6)rQDgaHf4RvJt@0VK1li6tTZQ?)66;ME6u~q<>o4LwRxm@g1Oz? zZNAxji}^P59p*LWyUh2P?>G0DpEN&Ze%kzu`8o4m^FH&-=2y&z%*V|in*W_DO-)HH zNxeGtn$!iUds7dj9!Wiw`dRANspnI_PyI3Vx6})1BrPm0B5hDwLt01LoV0~$i_?~- zEl*pSc6-_#X&chErahGQXxjF)U1`sxJ(spO?ZvdS7PY0)Qfq0j%&>G>uD2|(EVL}P ztgzf_S!KD?vevS}(qnnRveWXc<$24Cmi?B)me(yuEhj7|EvGG?Sbj>U>EiV0bXmG0 zU6Y=au1`0mo71z>3(|+AS7kh$u`Od)#{P`M8OJhCXPnFUHshZeKV|%!@mt1)%&1Ih zraV)bnUJZ@)Mh4SmSwhO-k!N9^QFwgnI|$&Wqy?TMdmpxwo+@9Rce)671l(n$!fNy bSqE4%twXHk)@r}kON3AE?hvOJSx5d4AF42j literal 0 HcmV?d00001 diff --git a/Examples/AnimatedGradient/AnimatedGradient.xcodeproj/xcuserdata/brent.xcuserdatad/xcschemes/xcschememanagement.plist b/Examples/AnimatedGradient/AnimatedGradient.xcodeproj/xcuserdata/brent.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..c69a54d --- /dev/null +++ b/Examples/AnimatedGradient/AnimatedGradient.xcodeproj/xcuserdata/brent.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + AnimatedGradient.xcscheme_^#shared#^_ + + orderHint + 0 + + + SuppressBuildableAutocreation + + 13B07F861A680F5B00A75B9A + + primary + + + + + diff --git a/Examples/AnimatedGradient/android/app/build.gradle b/Examples/AnimatedGradient/android/app/build.gradle new file mode 100644 index 0000000..0ca9bf4 --- /dev/null +++ b/Examples/AnimatedGradient/android/app/build.gradle @@ -0,0 +1,79 @@ +apply plugin: "com.android.application" + +/** + * The react.gradle file registers two tasks: bundleDebugJsAndAssets and bundleReleaseJsAndAssets. + * These basically call `react-native bundle` with the correct arguments during the Android build + * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the + * bundle directly from the development server. Below you can see all the possible configurations + * and their defaults. If you decide to add a configuration block, make sure to add it before the + * `apply from: "react.gradle"` line. + * + * project.ext.react = [ + * // the name of the generated asset file containing your JS bundle + * bundleAssetName: "index.android.bundle", + * + * // the entry file for bundle generation + * entryFile: "index.android.js", + * + * // whether to bundle JS and assets in debug mode + * bundleInDebug: false, + * + * // whether to bundle JS and assets in release mode + * bundleInRelease: true, + * + * // the root of your project, i.e. where "package.json" lives + * root: "../../", + * + * // where to put the JS bundle asset in debug mode + * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", + * + * // where to put the JS bundle asset in release mode + * jsBundleDirRelease: "$buildDir/intermediates/assets/release", + * + * // where to put drawable resources / React Native assets, e.g. the ones you use via + * // require('./image.png')), in debug mode + * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", + * + * // where to put drawable resources / React Native assets, e.g. the ones you use via + * // require('./image.png')), in release mode + * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", + * + * // by default the gradle tasks are skipped if none of the JS files or assets change; this means + * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to + * // date; if you have any other folders that you want to ignore for performance reasons (gradle + * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ + * // for example, you might want to remove it from here. + * inputExcludes: ["android/**", "ios/**"] + * ] + */ + +apply from: "react.gradle" + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.1" + + defaultConfig { + applicationId "com.animatedgradient" + minSdkVersion 16 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + ndk { + abiFilters "armeabi-v7a", "x86" + } + } + buildTypes { + release { + minifyEnabled false // Set this to true to enable Proguard + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + } + } +} + +dependencies { + compile fileTree(dir: "libs", include: ["*.jar"]) + compile "com.android.support:appcompat-v7:23.0.1" + compile "com.facebook.react:react-native:0.16.+" + compile project(':react-native-linear-gradient') +} diff --git a/Examples/AnimatedGradient/android/app/proguard-rules.pro b/Examples/AnimatedGradient/android/app/proguard-rules.pro new file mode 100644 index 0000000..ffa8c9f --- /dev/null +++ b/Examples/AnimatedGradient/android/app/proguard-rules.pro @@ -0,0 +1,60 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Disabling obfuscation is useful if you collect stack traces from production crashes +# (unless you are using a system that supports de-obfuscate the stack traces). +-dontobfuscate + +# React Native + +# Keep our interfaces so they can be used by other ProGuard rules. +# See http://sourceforge.net/p/proguard/bugs/466/ +-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip +-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters + +# Do not strip any method/class that is annotated with @DoNotStrip +-keep @com.facebook.proguard.annotations.DoNotStrip class * +-keepclassmembers class * { + @com.facebook.proguard.annotations.DoNotStrip *; +} + +-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { + void set*(***); + *** get*(); +} + +-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } +-keep class * extends com.facebook.react.bridge.NativeModule { *; } +-keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.ReactProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup ; } + +# okhttp + +-keepattributes Signature +-keepattributes *Annotation* +-keep class com.squareup.okhttp.** { *; } +-keep interface com.squareup.okhttp.** { *; } +-dontwarn com.squareup.okhttp.** + +# okio + +-keep class sun.misc.Unsafe { *; } +-dontwarn java.nio.file.* +-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement +-dontwarn okio.** diff --git a/Examples/AnimatedGradient/android/app/react.gradle b/Examples/AnimatedGradient/android/app/react.gradle new file mode 100644 index 0000000..1e08b00 --- /dev/null +++ b/Examples/AnimatedGradient/android/app/react.gradle @@ -0,0 +1,87 @@ +import org.apache.tools.ant.taskdefs.condition.Os + +def config = project.hasProperty("react") ? project.react : []; + +def bundleAssetName = config.bundleAssetName ?: "index.android.bundle" +def entryFile = config.entryFile ?: "index.android.js" + +// because elvis operator +def elvisFile(thing) { + return thing ? file(thing) : null; +} + +def reactRoot = elvisFile(config.root) ?: file("../../") +def jsBundleDirDebug = elvisFile(config.jsBundleDirDebug) ?: + file("$buildDir/intermediates/assets/debug") +def jsBundleDirRelease = elvisFile(config.jsBundleDirRelease) ?: + file("$buildDir/intermediates/assets/release") +def resourcesDirDebug = elvisFile(config.resourcesDirDebug) ?: + file("$buildDir/intermediates/res/merged/debug") +def resourcesDirRelease = elvisFile(config.resourcesDirRelease) ?: + file("$buildDir/intermediates/res/merged/release") +def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"] + +def jsBundleFileDebug = file("$jsBundleDirDebug/$bundleAssetName") +def jsBundleFileRelease = file("$jsBundleDirRelease/$bundleAssetName") + +task bundleDebugJsAndAssets(type: Exec) { + // create dirs if they are not there (e.g. the "clean" task just ran) + doFirst { + jsBundleDirDebug.mkdirs() + resourcesDirDebug.mkdirs() + } + + // set up inputs and outputs so gradle can cache the result + inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) + outputs.dir jsBundleDirDebug + outputs.dir resourcesDirDebug + + // set up the call to the react-native cli + workingDir reactRoot + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", + entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug + } else { + commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", + entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug + } + + enabled config.bundleInDebug ?: false +} + +task bundleReleaseJsAndAssets(type: Exec) { + // create dirs if they are not there (e.g. the "clean" task just ran) + doFirst { + jsBundleDirRelease.mkdirs() + resourcesDirRelease.mkdirs() + } + + // set up inputs and outputs so gradle can cache the result + inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) + outputs.dir jsBundleDirRelease + outputs.dir resourcesDirRelease + + // set up the call to the react-native cli + workingDir reactRoot + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + commandLine "cmd","/c", "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", + entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease + } else { + commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", + entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease + } + + enabled config.bundleInRelease ?: true +} + +gradle.projectsEvaluated { + // hook bundleDebugJsAndAssets into the android build process + bundleDebugJsAndAssets.dependsOn mergeDebugResources + bundleDebugJsAndAssets.dependsOn mergeDebugAssets + processDebugResources.dependsOn bundleDebugJsAndAssets + + // hook bundleReleaseJsAndAssets into the android build process + bundleReleaseJsAndAssets.dependsOn mergeReleaseResources + bundleReleaseJsAndAssets.dependsOn mergeReleaseAssets + processReleaseResources.dependsOn bundleReleaseJsAndAssets +} diff --git a/Examples/AnimatedGradient/android/app/src/main/AndroidManifest.xml b/Examples/AnimatedGradient/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..645a381 --- /dev/null +++ b/Examples/AnimatedGradient/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + diff --git a/Examples/AnimatedGradient/android/app/src/main/java/com/animatedgradient/MainActivity.java b/Examples/AnimatedGradient/android/app/src/main/java/com/animatedgradient/MainActivity.java new file mode 100644 index 0000000..757ec2e --- /dev/null +++ b/Examples/AnimatedGradient/android/app/src/main/java/com/animatedgradient/MainActivity.java @@ -0,0 +1,81 @@ +package com.animatedgradient; + +import android.app.Activity; +import android.os.Bundle; +import android.view.KeyEvent; + +import com.BV.LinearGradient.LinearGradientPackage; + +import com.facebook.react.LifecycleState; +import com.facebook.react.ReactInstanceManager; +import com.facebook.react.ReactRootView; +import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; +import com.facebook.react.shell.MainReactPackage; +import com.facebook.soloader.SoLoader; + +public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { + + private ReactInstanceManager mReactInstanceManager; + private ReactRootView mReactRootView; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + mReactRootView = new ReactRootView(this); + + mReactInstanceManager = ReactInstanceManager.builder() + .setApplication(getApplication()) + .setBundleAssetName("index.android.bundle") + .setJSMainModuleName("index.android") + .addPackage(new MainReactPackage()) + .addPackage(new LinearGradientPackage()) + .setUseDeveloperSupport(BuildConfig.DEBUG) + .setInitialLifecycleState(LifecycleState.RESUMED) + .build(); + + mReactRootView.startReactApplication(mReactInstanceManager, "AnimatedGradient", null); + + setContentView(mReactRootView); + } + + @Override + public boolean onKeyUp(int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_MENU && mReactInstanceManager != null) { + mReactInstanceManager.showDevOptionsDialog(); + return true; + } + return super.onKeyUp(keyCode, event); + } + + @Override + public void onBackPressed() { + if (mReactInstanceManager != null) { + mReactInstanceManager.onBackPressed(); + } else { + super.onBackPressed(); + } + } + + @Override + public void invokeDefaultOnBackPressed() { + super.onBackPressed(); + } + + @Override + protected void onPause() { + super.onPause(); + + if (mReactInstanceManager != null) { + mReactInstanceManager.onPause(); + } + } + + @Override + protected void onResume() { + super.onResume(); + + if (mReactInstanceManager != null) { + mReactInstanceManager.onResume(this, this); + } + } +} diff --git a/Examples/AnimatedGradient/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Examples/AnimatedGradient/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..cde69bcccec65160d92116f20ffce4fce0b5245c GIT binary patch literal 3418 zcmZ{nX*|@A^T0p5j$I+^%FVhdvMbgt%d+mG98ubwNv_tpITppba^GiieBBZGI>I89 zGgm8TA>_)DlEu&W;s3#ZUNiH4&CF{a%siTjzG;eOzQB6{003qKeT?}z_5U*{{kgZ; zdV@U&tqa-&4FGisjMN8o=P}$t-`oTM2oeB5d9mHPgTYJx4jup)+5a;Tke$m708DocFzDL>U$$}s6FGiy_I1?O zHXq`q884|^O4Q*%V#vwxqCz-#8i`Gu)2LeB0{%%VKunOF%9~JcFB9MM>N00M`E~;o zBU%)O5u-D6NF~OQV7TV#JAN;=Lylgxy0kncoQpGq<<_gxw`FC=C-cV#$L|(47Hatl ztq3Jngq00x#}HGW@_tj{&A?lwOwrVX4@d66vLVyj1H@i}VD2YXd)n03?U5?cKtFz4 zW#@+MLeDVP>fY0F2IzT;r5*MAJ2}P8Z{g3utX0<+ZdAC)Tvm-4uN!I7|BTw&G%RQn zR+A5VFx(}r<1q9^N40XzP=Jp?i=jlS7}T~tB4CsWx!XbiHSm zLu}yar%t>-3jlutK=wdZhES->*1X({YI;DN?6R=C*{1U6%wG`0>^?u}h0hhqns|SeTmV=s;Gxx5F9DtK>{>{f-`SpJ`dO26Ujk?^%ucsuCPe zIUk1(@I3D^7{@jmXO2@<84|}`tDjB}?S#k$ik;jC))BH8>8mQWmZ zF#V|$gW|Xc_wmmkoI-b5;4AWxkA>>0t4&&-eC-J_iP(tLT~c6*(ZnSFlhw%}0IbiJ ztgnrZwP{RBd(6Ds`dM~k;rNFgkbU&Yo$KR#q&%Kno^YXF5ONJwGwZ*wE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mV?d00001 diff --git a/Examples/AnimatedGradient/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Examples/AnimatedGradient/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..bfa42f0e7b91d006d22352c9ff2f134e504e3c1d GIT binary patch literal 4842 zcmZ{oXE5C1x5t0WvTCfdv7&7fy$d2l*k#q|U5FAbL??P!61}%ovaIM)mL!5G(V|6J zAtDH(OY|Du^}l!K&fFLG%sJ2JIp@rG=9y>Ci)Wq~U2RobsvA@Q0MM$dq4lq5{hy#9 zzgp+B{O(-=?1<7r0l>Q?>N6X%s~lmgrmqD6fjj_!c?AF`S0&6U06Z51fWOuNAe#jM z%pSN#J-Mp}`ICpL=qp~?u~Jj$6(~K_%)9}Bn(;pY0&;M00H9x2N23h=CpR7kr8A9X zU%oh4-E@i!Ac}P+&%vOPQ3warO9l!SCN)ixGW54Jsh!`>*aU)#&Mg7;#O_6xd5%I6 zneGSZL3Kn-4B^>#T7pVaIHs3^PY-N^v1!W=%gzfioIWosZ!BN?_M)OOux&6HCyyMf z3ToZ@_h75A33KyC!T)-zYC-bp`@^1n;w3~N+vQ0#4V7!f|JPMlWWJ@+Tg~8>1$GzLlHGuxS)w&NAF*&Y;ef`T^w4HP7GK%6UA8( z{&ALM(%!w2U7WFWwq8v4H3|0cOjdt7$JLh(;U8VcTG;R-vmR7?21nA?@@b+XPgJbD z*Y@v&dTqo5Bcp-dIQQ4@?-m{=7>`LZ{g4jvo$CE&(+7(rp#WShT9&9y>V#ikmXFau03*^{&d(AId0Jg9G;tc7K_{ivzBjqHuJx08cx<8U`z2JjtOK3( zvtuduBHha>D&iu#))5RKXm>(|$m=_;e?7ZveYy=J$3wjL>xPCte-MDcVW<;ng`nf= z9);CVVZjI-&UcSAlhDB{%0v$wPd=w6MBwsVEaV!hw~8G(rs`lw@|#AAHbyA&(I-7Y zFE&1iIGORsaskMqSYfX33U%&17oTszdHPjr&Sx(`IQzoccST*}!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LydQWbo7XN-o9X1i7;l+J_8Ncu zc=EX&dg`GRo4==cz2d_Rz28oLS`Suf6OCp~f{0-aQ`t5YZ=!CAMc6-RZw#}A%;s44 znf2`6gcgm=0SezTH9h+JzeR3Lcm;8?*@+?FDfguK^9)z(Z`I!RKrSAI?H~4et6GTkz07Qgq4B6%Q*8Y0yPc4x z8(^YwtZjYIeOvVLey#>@$UzIciJ#x0pJLFg=8UaZv%-&?Yzp7gWNIo_x^(d75=x2c zv|LQ`HrKP(8TqFxTiP5gdT2>aTN0S7XW*pilASS$UkJ2*n+==D)0mgTGxv43t61fr z47GkfMnD-zSH@|mZ26r*d3WEtr+l-xH@L}BM)~ThoMvKqGw=Ifc}BdkL$^wC}=(XSf4YpG;sA9#OSJf)V=rs#Wq$?Wj+nTlu$YXn yn3SQon5>kvtkl(BT2@T#Mvca!|08g9w{vm``2PjZHg=b<1c17-HkzPl9sXa)&-Ts$ literal 0 HcmV?d00001 diff --git a/Examples/AnimatedGradient/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Examples/AnimatedGradient/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..324e72cdd7480cb983fa1bcc7ce686e51ef87fe7 GIT binary patch literal 7718 zcmZ{JWl)?=u?hpbj?h-6mfK3P*Eck~k0Tzeg5-hkABxtZea0_k$f-mlF z0S@Qqtva`>x}TYzc}9LrO?P#qj+P1@HZ?W?0C;Muih9o&|G$cb@ocx1*PEUJ%~tM} z901hB;rx4#{@jOHs_MN00ADr$2n+#$yJuJ64gh!x0KlF(07#?(0ENrf7G3D`0EUHz zisCaq%dJ9dz%zhdRNuG*01nCjDhiPCl@b8xIMfv7^t~4jVRrSTGYyZUWqY@yW=)V_ z&3sUP1SK9v1f{4lDSN(agrKYULc;#EGDVeU*5b@#MOSY5JBn#QG8wqxQh+mdR638{mo5f>O zLUdZIPSjFk0~F26zDrM3y_#P^P91oWtLlPaZrhnM$NR%qsbHHK#?fN?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&$|p_NG)fOaafGv|_b9G$;1LzZ-1aIE?*R6kHg}dy%~K(Q5S2O6086 z{lN&8;0>!pq^f*Jlh=J%Rmaoed<=uf@$iKl+bieC83IT!09J&IF)9H)C?d!eW1UQ}BQwxaqQY47DpOk@`zZ zo>#SM@oI^|nrWm~Ol7=r`!Bp9lQNbBCeHcfN&X$kjj0R(@?f$OHHt|fWe6jDrYg3(mdEd$8P2Yzjt9*EM zLE|cp-Tzsdyt(dvLhU8}_IX&I?B=|yoZ!&<`9&H5PtApt=VUIB4l0a1NH v0SQqt3DM`an1p};^>=lX|A*k@Y-MNT^ZzF}9G-1G696?OEyXH%^Pv9$0dR%J literal 0 HcmV?d00001 diff --git a/Examples/AnimatedGradient/android/app/src/main/res/values/strings.xml b/Examples/AnimatedGradient/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..b092214 --- /dev/null +++ b/Examples/AnimatedGradient/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + AnimatedGradient + diff --git a/Examples/AnimatedGradient/android/app/src/main/res/values/styles.xml b/Examples/AnimatedGradient/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..319eb0c --- /dev/null +++ b/Examples/AnimatedGradient/android/app/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/Examples/AnimatedGradient/android/build.gradle b/Examples/AnimatedGradient/android/build.gradle new file mode 100644 index 0000000..bdb0fcc --- /dev/null +++ b/Examples/AnimatedGradient/android/build.gradle @@ -0,0 +1,23 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.3.1' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + mavenLocal() + jcenter() + jcenter { + url "http://dl.bintray.com/mkonicek/maven" + } + } +} diff --git a/Examples/AnimatedGradient/android/settings.gradle b/Examples/AnimatedGradient/android/settings.gradle new file mode 100644 index 0000000..bb0ddd2 --- /dev/null +++ b/Examples/AnimatedGradient/android/settings.gradle @@ -0,0 +1,6 @@ +rootProject.name = 'AnimatedGradient' + +include ':app' + +include ':app', ':react-native-linear-gradient' +project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android') diff --git a/Examples/AnimatedGradient/iOS/AppDelegate.m b/Examples/AnimatedGradient/iOS/AppDelegate.m index 03b5ba3..c4e15da 100644 --- a/Examples/AnimatedGradient/iOS/AppDelegate.m +++ b/Examples/AnimatedGradient/iOS/AppDelegate.m @@ -26,7 +26,7 @@ // // To run on device, change `localhost` to the IP address of your computer, and make sure your computer and // iOS device are on the same Wi-Fi network. - jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"]; + jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; // OPTION 2 // Load from pre-bundled file on disk. To re-generate the static bundle, run @@ -38,6 +38,7 @@ RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"AnimatedGradient" + initialProperties:nil launchOptions:launchOptions]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; diff --git a/Examples/AnimatedGradient/iOS/Info.plist b/Examples/AnimatedGradient/iOS/Info.plist index c6d2494..dcc5a33 100644 --- a/Examples/AnimatedGradient/iOS/Info.plist +++ b/Examples/AnimatedGradient/iOS/Info.plist @@ -22,6 +22,11 @@ 1 LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities diff --git a/Examples/AnimatedGradient/index.android.js b/Examples/AnimatedGradient/index.android.js new file mode 100644 index 0000000..6b0cc50 --- /dev/null +++ b/Examples/AnimatedGradient/index.android.js @@ -0,0 +1,63 @@ +'use strict'; + +var React = require('react-native'); +var { + AppRegistry, + StyleSheet, + Text, + View, +} = React; + +var TimerMixin = require('react-timer-mixin'); +var LinearGradient = require('react-native-linear-gradient'); +var incrementColor = require('./incrementColor'); + +var AnimatedGradient = React.createClass({ + mixins: [TimerMixin], + + getInitialState: function() { + return { + count: 0, + colorTop: '#000000', + colorBottom: '#cccccc', + } + }, + + componentDidMount: function() { + this.setInterval(() => { + this.setState({ + count: this.state.count + 1, + colorTop: incrementColor(this.state.colorTop, 1), + colorBottom: incrementColor(this.state.colorBottom, -1), + }); + }, 20); + }, + + render: function() { + return ( + + + + {this.state.colorTop} + {this.state.colorBottom} + + ); + } +}); + +var styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + backgroundColor: '#F5FCFF', + }, + gradient: { + width: 200, + height: 200, + }, +}); + +AppRegistry.registerComponent('AnimatedGradient', () => AnimatedGradient); diff --git a/Examples/AnimatedGradient/index.ios.js b/Examples/AnimatedGradient/index.ios.js index 7238338..6b0cc50 100644 --- a/Examples/AnimatedGradient/index.ios.js +++ b/Examples/AnimatedGradient/index.ios.js @@ -24,12 +24,11 @@ var AnimatedGradient = React.createClass({ }, componentDidMount: function() { - var self = this; - this.setInterval(function() { - self.setState({ - count: self.state.count + 1, - colorTop: incrementColor(self.state.colorTop, 1), - colorBottom: incrementColor(self.state.colorBottom, -1), + this.setInterval(() => { + this.setState({ + count: this.state.count + 1, + colorTop: incrementColor(this.state.colorTop, 1), + colorBottom: incrementColor(this.state.colorBottom, -1), }); }, 20); }, diff --git a/Examples/AnimatedGradient/package.json b/Examples/AnimatedGradient/package.json index 408ece6..f7d0d2e 100644 --- a/Examples/AnimatedGradient/package.json +++ b/Examples/AnimatedGradient/package.json @@ -6,7 +6,8 @@ "start": "node_modules/react-native/packager/packager.sh" }, "dependencies": { - "react-native": "^0.3.10", - "react-native-linear-gradient": "^0.1.7" + "react-native": "0.16.0", + "react-native-linear-gradient": "../../", + "react-timer-mixin": "^0.13.3" } } diff --git a/index.android.js b/index.android.js index 26b458c..08174c9 100644 --- a/index.android.js +++ b/index.android.js @@ -7,7 +7,8 @@ var LinearGradient = React.createClass({ start: PropTypes.array, end: PropTypes.array, colors: PropTypes.array.isRequired, - locations: PropTypes.array + locations: PropTypes.array, + ...View.propTypes, }, render: function() { diff --git a/index.ios.js b/index.ios.js index 7cd1cf6..254a97f 100644 --- a/index.ios.js +++ b/index.ios.js @@ -6,10 +6,14 @@ 'use strict'; var React = require('react-native'); -var { requireNativeComponent, processColor } = React; +var { requireNativeComponent, processColor, View } = React; var NativeLinearGradient = requireNativeComponent('BVLinearGradient', null); var LinearGradient = React.createClass({ + propTypes: { + ...View.propTypes, + }, + render: function() { var { colors, ...otherProps } = this.props; return (