mirror of
https://github.com/status-im/react-native-fast-image.git
synced 2025-02-23 11:48:16 +00:00
Install dependencies and add example code.
This commit is contained in:
parent
e68fe53fbe
commit
c0a784a683
@ -33,6 +33,7 @@ local.properties
|
||||
# node.js
|
||||
#
|
||||
node_modules/
|
||||
ios/Pods/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
|
49
react-native-fast-image-example-cocoapods/App.js
vendored
49
react-native-fast-image-example-cocoapods/App.js
vendored
@ -1,49 +0,0 @@
|
||||
/**
|
||||
* Sample React Native App
|
||||
* https://github.com/facebook/react-native
|
||||
*
|
||||
* @format
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import React, {Component} from 'react';
|
||||
import {Platform, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
const instructions = Platform.select({
|
||||
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
|
||||
android:
|
||||
'Double tap R on your keyboard to reload,\n' +
|
||||
'Shake or press menu button for dev menu',
|
||||
});
|
||||
|
||||
type Props = {};
|
||||
export default class App extends Component<Props> {
|
||||
render() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.welcome}>Welcome to React Native!</Text>
|
||||
<Text style={styles.instructions}>To get started, edit App.js</Text>
|
||||
<Text style={styles.instructions}>{instructions}</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#F5FCFF',
|
||||
},
|
||||
welcome: {
|
||||
fontSize: 20,
|
||||
textAlign: 'center',
|
||||
margin: 10,
|
||||
},
|
||||
instructions: {
|
||||
textAlign: 'center',
|
||||
color: '#333333',
|
||||
marginBottom: 5,
|
||||
},
|
||||
});
|
@ -137,6 +137,9 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':react-native-image-picker')
|
||||
implementation project(':react-native-vector-icons')
|
||||
implementation project(':react-native-fast-image')
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,6 +3,9 @@ package com.reactnativefastimageexamplecocoapods;
|
||||
import android.app.Application;
|
||||
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.imagepicker.ImagePickerPackage;
|
||||
import com.oblador.vectoricons.VectorIconsPackage;
|
||||
import com.dylanvann.fastimage.FastImageViewPackage;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
@ -22,7 +25,10 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
return Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage()
|
||||
new MainReactPackage(),
|
||||
new ImagePickerPackage(),
|
||||
new VectorIconsPackage(),
|
||||
new FastImageViewPackage()
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
rootProject.name = 'ReactNativeFastImageExampleCocoaPods'
|
||||
include ':react-native-image-picker'
|
||||
project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android')
|
||||
include ':react-native-vector-icons'
|
||||
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
|
||||
include ':react-native-fast-image'
|
||||
project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fast-image/android')
|
||||
|
||||
include ':app'
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @format */
|
||||
|
||||
import {AppRegistry} from 'react-native';
|
||||
import App from './App';
|
||||
import App from './src';
|
||||
import {name as appName} from './app.json';
|
||||
|
||||
AppRegistry.registerComponent(appName, () => App);
|
||||
|
22
react-native-fast-image-example-cocoapods/ios/Podfile
Normal file
22
react-native-fast-image-example-cocoapods/ios/Podfile
Normal file
@ -0,0 +1,22 @@
|
||||
platform :ios, '9.0'
|
||||
|
||||
target 'ReactNativeFastImageExampleCocoaPods' do
|
||||
pod 'React', :path => '../node_modules/react-native', :subspecs => [
|
||||
'Core',
|
||||
'CxxBridge',
|
||||
'DevSupport',
|
||||
'RCTText',
|
||||
'RCTNetwork',
|
||||
'RCTWebSocket',
|
||||
'RCTAnimation',
|
||||
'RCTImage',
|
||||
]
|
||||
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
|
||||
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
|
||||
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
|
||||
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
|
||||
|
||||
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
|
||||
pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
|
||||
pod 'react-native-fast-image', :path => '../node_modules/react-native-fast-image'
|
||||
end
|
118
react-native-fast-image-example-cocoapods/ios/Podfile.lock
Normal file
118
react-native-fast-image-example-cocoapods/ios/Podfile.lock
Normal file
@ -0,0 +1,118 @@
|
||||
PODS:
|
||||
- boost-for-react-native (1.63.0)
|
||||
- DoubleConversion (1.1.6)
|
||||
- FLAnimatedImage (1.0.12)
|
||||
- Folly (2016.10.31.00):
|
||||
- boost-for-react-native
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- glog (0.3.5)
|
||||
- React (0.57.1):
|
||||
- React/Core (= 0.57.1)
|
||||
- react-native-fast-image (5.0.9):
|
||||
- FLAnimatedImage
|
||||
- React
|
||||
- SDWebImage/Core
|
||||
- SDWebImage/GIF
|
||||
- react-native-image-picker (0.14.3):
|
||||
- React
|
||||
- React/Core (0.57.1):
|
||||
- yoga (= 0.57.1.React)
|
||||
- React/CxxBridge (0.57.1):
|
||||
- Folly (= 2016.10.31.00)
|
||||
- React/Core
|
||||
- React/cxxreact
|
||||
- React/cxxreact (0.57.1):
|
||||
- boost-for-react-native (= 1.63.0)
|
||||
- Folly (= 2016.10.31.00)
|
||||
- React/jschelpers
|
||||
- React/jsinspector
|
||||
- React/DevSupport (0.57.1):
|
||||
- React/Core
|
||||
- React/RCTWebSocket
|
||||
- React/fishhook (0.57.1)
|
||||
- React/jschelpers (0.57.1):
|
||||
- Folly (= 2016.10.31.00)
|
||||
- React/PrivateDatabase
|
||||
- React/jsinspector (0.57.1)
|
||||
- React/PrivateDatabase (0.57.1)
|
||||
- React/RCTAnimation (0.57.1):
|
||||
- React/Core
|
||||
- React/RCTBlob (0.57.1):
|
||||
- React/Core
|
||||
- React/RCTImage (0.57.1):
|
||||
- React/Core
|
||||
- React/RCTNetwork
|
||||
- React/RCTNetwork (0.57.1):
|
||||
- React/Core
|
||||
- React/RCTText (0.57.1):
|
||||
- React/Core
|
||||
- React/RCTWebSocket (0.57.1):
|
||||
- React/Core
|
||||
- React/fishhook
|
||||
- React/RCTBlob
|
||||
- RNVectorIcons (5.0.0):
|
||||
- React
|
||||
- SDWebImage/Core (4.4.2)
|
||||
- SDWebImage/GIF (4.4.2):
|
||||
- FLAnimatedImage (~> 1.0)
|
||||
- SDWebImage/Core
|
||||
- yoga (0.57.1.React)
|
||||
|
||||
DEPENDENCIES:
|
||||
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
|
||||
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
|
||||
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
|
||||
- react-native-fast-image (from `../node_modules/react-native-fast-image`)
|
||||
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
|
||||
- React/Core (from `../node_modules/react-native`)
|
||||
- React/CxxBridge (from `../node_modules/react-native`)
|
||||
- React/DevSupport (from `../node_modules/react-native`)
|
||||
- React/RCTAnimation (from `../node_modules/react-native`)
|
||||
- React/RCTImage (from `../node_modules/react-native`)
|
||||
- React/RCTNetwork (from `../node_modules/react-native`)
|
||||
- React/RCTText (from `../node_modules/react-native`)
|
||||
- React/RCTWebSocket (from `../node_modules/react-native`)
|
||||
- RNVectorIcons (from `../node_modules/react-native-vector-icons`)
|
||||
- yoga (from `../node_modules/react-native/ReactCommon/yoga`)
|
||||
|
||||
SPEC REPOS:
|
||||
https://github.com/cocoapods/specs.git:
|
||||
- boost-for-react-native
|
||||
- FLAnimatedImage
|
||||
- SDWebImage
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
DoubleConversion:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
|
||||
Folly:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
|
||||
glog:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
|
||||
React:
|
||||
:path: "../node_modules/react-native"
|
||||
react-native-fast-image:
|
||||
:path: "../node_modules/react-native-fast-image"
|
||||
react-native-image-picker:
|
||||
:path: "../node_modules/react-native-image-picker"
|
||||
RNVectorIcons:
|
||||
:path: "../node_modules/react-native-vector-icons"
|
||||
yoga:
|
||||
:path: "../node_modules/react-native/ReactCommon/yoga"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
|
||||
DoubleConversion: bb338842f62ab1d708ceb63ec3d999f0f3d98ecd
|
||||
FLAnimatedImage: 4a0b56255d9b05f18b6dd7ee06871be5d3b89e31
|
||||
Folly: c89ac2d5c6ab169cd7397ef27485c44f35f742c7
|
||||
glog: e8acf0ebbf99759d3ff18c86c292a5898282dcde
|
||||
React: 1fe0eb13d90b625d94c3b117c274dcfd2e760e11
|
||||
react-native-fast-image: cba3d9bf9c2cf8ddb643d887a686c53a5dd90a2c
|
||||
react-native-image-picker: b303e31c3c4ada1d7cb1342423d328d2efb07fb3
|
||||
RNVectorIcons: c0dbfbf6068fefa240c37b0f71bd03b45dddac44
|
||||
SDWebImage: 624d6e296c69b244bcede364c72ae0430ac14681
|
||||
yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85
|
||||
|
||||
PODFILE CHECKSUM: 9c1b580892a7e8ba16c3ef11342f53e075ff596a
|
||||
|
||||
COCOAPODS: 1.5.3
|
@ -36,6 +36,7 @@
|
||||
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
|
||||
2DCD954D1E0B4F2C00145EB5 /* ReactNativeFastImageExampleCocoaPodsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ReactNativeFastImageExampleCocoaPodsTests.m */; };
|
||||
2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
|
||||
4264737B25A8C730381E2FEF /* libPods-ReactNativeFastImageExampleCocoaPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29BCA26A25BE80EA2936FECC /* libPods-ReactNativeFastImageExampleCocoaPods.a */; };
|
||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
|
||||
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
|
||||
/* End PBXBuildFile section */
|
||||
@ -336,13 +337,16 @@
|
||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ReactNativeFastImageExampleCocoaPods/Info.plist; sourceTree = "<group>"; };
|
||||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ReactNativeFastImageExampleCocoaPods/main.m; sourceTree = "<group>"; };
|
||||
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
|
||||
29BCA26A25BE80EA2936FECC /* libPods-ReactNativeFastImageExampleCocoaPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeFastImageExampleCocoaPods.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D02E47B1E0B4A5D006451C7 /* ReactNativeFastImageExampleCocoaPods-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ReactNativeFastImageExampleCocoaPods-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D02E4901E0B4A5D006451C7 /* ReactNativeFastImageExampleCocoaPods-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ReactNativeFastImageExampleCocoaPods-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
|
||||
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
|
||||
7996F6D11899981B56E51366 /* Pods-ReactNativeFastImageExampleCocoaPods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeFastImageExampleCocoaPods.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ReactNativeFastImageExampleCocoaPods/Pods-ReactNativeFastImageExampleCocoaPods.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
|
||||
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
|
||||
FD0561220779242806D220FD /* Pods-ReactNativeFastImageExampleCocoaPods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeFastImageExampleCocoaPods.release.xcconfig"; path = "Pods/Target Support Files/Pods-ReactNativeFastImageExampleCocoaPods/Pods-ReactNativeFastImageExampleCocoaPods.release.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -370,6 +374,7 @@
|
||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
|
||||
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
|
||||
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
|
||||
4264737B25A8C730381E2FEF /* libPods-ReactNativeFastImageExampleCocoaPods.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -458,6 +463,15 @@
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
061CD2C2470D64BBD5177147 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7996F6D11899981B56E51366 /* Pods-ReactNativeFastImageExampleCocoaPods.debug.xcconfig */,
|
||||
FD0561220779242806D220FD /* Pods-ReactNativeFastImageExampleCocoaPods.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
139105B71AF99BAD00B5F7CC /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -519,6 +533,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2D16E6891FA4F8E400B85C8A /* libReact.a */,
|
||||
29BCA26A25BE80EA2936FECC /* libPods-ReactNativeFastImageExampleCocoaPods.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@ -577,6 +592,7 @@
|
||||
00E356EF1AD99517003FC87E /* ReactNativeFastImageExampleCocoaPodsTests */,
|
||||
83CBBA001A601CBA00E9B192 /* Products */,
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
||||
061CD2C2470D64BBD5177147 /* Pods */,
|
||||
);
|
||||
indentWidth = 2;
|
||||
sourceTree = "<group>";
|
||||
@ -628,10 +644,12 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeFastImageExampleCocoaPods" */;
|
||||
buildPhases = (
|
||||
A856D317ED4E937AFEF77AAE /* [CP] Check Pods Manifest.lock */,
|
||||
13B07F871A680F5B00A75B9A /* Sources */,
|
||||
13B07F8C1A680F5B00A75B9A /* Frameworks */,
|
||||
13B07F8E1A680F5B00A75B9A /* Resources */,
|
||||
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
|
||||
3EAB188639EB6C40E829A6A4 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -1098,6 +1116,68 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
|
||||
};
|
||||
3EAB188639EB6C40E829A6A4 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-ReactNativeFastImageExampleCocoaPods/Pods-ReactNativeFastImageExampleCocoaPods-resources.sh",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Feather.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf",
|
||||
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ReactNativeFastImageExampleCocoaPods/Pods-ReactNativeFastImageExampleCocoaPods-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
A856D317ED4E937AFEF77AAE /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-ReactNativeFastImageExampleCocoaPods-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@ -1204,6 +1284,7 @@
|
||||
};
|
||||
13B07F941A680F5B00A75B9A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7996F6D11899981B56E51366 /* Pods-ReactNativeFastImageExampleCocoaPods.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
@ -1223,6 +1304,7 @@
|
||||
};
|
||||
13B07F951A680F5B00A75B9A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = FD0561220779242806D220FD /* Pods-ReactNativeFastImageExampleCocoaPods.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:ReactNativeFastImageExampleCocoaPods.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -24,8 +24,28 @@
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>localhost</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>FontAwesome.ttf</string>
|
||||
<string>Foundation.ttf</string>
|
||||
<string>Ionicons.ttf</string>
|
||||
<string>MaterialIcons.ttf</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
@ -40,21 +60,5 @@
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>localhost</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -8,7 +8,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "16.5.0",
|
||||
"react-native": "0.57.1"
|
||||
"react-native": "0.57.1",
|
||||
"react-native-fast-image": "^5.0.9",
|
||||
"react-native-image-picker": "^0.26.10",
|
||||
"react-native-image-progress": "^1.1.1",
|
||||
"react-native-status-bar-height": "^2.1.0",
|
||||
"react-native-vector-icons": "^5.0.0",
|
||||
"react-navigation": "^2.16.0",
|
||||
"react-timeout": "^1.1.2",
|
||||
"uuid": "^3.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-jest": "23.6.0",
|
||||
@ -19,4 +27,4 @@
|
||||
"jest": {
|
||||
"preset": "react-native"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
72
react-native-fast-image-example-cocoapods/src/AutoSizeExample.js
vendored
Normal file
72
react-native-fast-image-example-cocoapods/src/AutoSizeExample.js
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
import React, { Component } from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const GIF_URL =
|
||||
'https://cdn-images-1.medium.com/max/1600/1*-CY5bU4OqiJRox7G00sftw.gif'
|
||||
|
||||
class AutoSizingImage extends Component {
|
||||
state = {
|
||||
height: 0,
|
||||
width: 0,
|
||||
}
|
||||
|
||||
onLoad = e => {
|
||||
const {
|
||||
nativeEvent: { width, height },
|
||||
} = e
|
||||
this.setState({ width, height })
|
||||
if (this.props.onLoad) this.props.onLoad(e)
|
||||
}
|
||||
|
||||
getHeight = () => {
|
||||
if (!this.state.height) return this.props.defaultHeight
|
||||
const ratio = this.state.height / this.state.width
|
||||
const height = this.props.width * ratio
|
||||
return height
|
||||
}
|
||||
|
||||
render() {
|
||||
const height = this.getHeight()
|
||||
return (
|
||||
<FastImage
|
||||
{...this.props}
|
||||
onLoad={this.onLoad}
|
||||
style={[{ width: this.props.width, height }, this.props.style]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
AutoSizingImage.defaultProps = {
|
||||
defaultHeight: 300,
|
||||
}
|
||||
|
||||
const AutoSizeExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• AutoSize." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<AutoSizingImage
|
||||
style={styles.image}
|
||||
width={200}
|
||||
source={{ uri: GIF_URL + bust }}
|
||||
/>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
flex: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(AutoSizeExample)
|
60
react-native-fast-image-example-cocoapods/src/BorderRadiusExample.js
vendored
Normal file
60
react-native-fast-image-example-cocoapods/src/BorderRadiusExample.js
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const IMAGE_URL = 'https://media.giphy.com/media/GEsoqZDGVoisw/giphy.gif'
|
||||
|
||||
const BorderRadiusExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Border radius." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<FastImage
|
||||
style={styles.imageSquare}
|
||||
source={{
|
||||
uri: IMAGE_URL + bust,
|
||||
}}
|
||||
/>
|
||||
<FastImage
|
||||
style={styles.imageRectangular}
|
||||
source={{
|
||||
uri: IMAGE_URL + bust,
|
||||
}}
|
||||
/>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
imageSquare: {
|
||||
borderRadius: 50,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
width: 100,
|
||||
flex: 0,
|
||||
},
|
||||
imageRectangular: {
|
||||
borderRadius: 50,
|
||||
borderTopLeftRadius: 10,
|
||||
borderBottomRightRadius: 10,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
flex: 1,
|
||||
},
|
||||
plus: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
position: 'absolute',
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(BorderRadiusExample)
|
8
react-native-fast-image-example-cocoapods/src/BulletText.js
vendored
Normal file
8
react-native-fast-image-example-cocoapods/src/BulletText.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import React from 'react'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const BulletText = ({ text, children }) => (
|
||||
<FeatureText text={`• ${text || children} •`} />
|
||||
)
|
||||
|
||||
export default BulletText
|
28
react-native-fast-image-example-cocoapods/src/Button.js
vendored
Normal file
28
react-native-fast-image-example-cocoapods/src/Button.js
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
|
||||
|
||||
const Button = ({ text, onPress }) => (
|
||||
<TouchableOpacity onPress={onPress}>
|
||||
<View style={styles.button}>
|
||||
<Text style={styles.text}>{text}</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
backgroundColor: 'black',
|
||||
margin: 10,
|
||||
height: 44,
|
||||
paddingLeft: 10,
|
||||
paddingRight: 10,
|
||||
borderRadius: 10,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
text: {
|
||||
color: 'white',
|
||||
},
|
||||
})
|
||||
|
||||
export default Button
|
16
react-native-fast-image-example-cocoapods/src/DefaultImageGrid.js
vendored
Normal file
16
react-native-fast-image-example-cocoapods/src/DefaultImageGrid.js
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
// @flow
|
||||
import React from 'react'
|
||||
import { Image } from 'react-native'
|
||||
import Icon from './Icons/Icon'
|
||||
import ImageGrid from './ImageGrid'
|
||||
|
||||
const DefaultImageGrid = () => <ImageGrid ImageComponent={Image} />
|
||||
|
||||
DefaultImageGrid.navigationOptions = {
|
||||
tabBarLabel: 'Image Grid',
|
||||
tabBarIcon: props => (
|
||||
<Icon name="ios-image" {...props} />
|
||||
),
|
||||
}
|
||||
|
||||
export default DefaultImageGrid
|
85
react-native-fast-image-example-cocoapods/src/FastImageExamples.js
vendored
Normal file
85
react-native-fast-image-example-cocoapods/src/FastImageExamples.js
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
import React from 'react'
|
||||
import { ScrollView, StatusBar, StyleSheet, Text, View } from 'react-native'
|
||||
import Icon from './Icons/Icon'
|
||||
import Section from './Section'
|
||||
import PriorityExample from './PriorityExample'
|
||||
import GifExample from './GifExample'
|
||||
import BorderRadiusExample from './BorderRadiusExample'
|
||||
import FeatureText from './FeatureText'
|
||||
import ProgressExample from './ProgressExample'
|
||||
import PreloadExample from './PreloadExample'
|
||||
import ResizeModeExample from './ResizeModeExample'
|
||||
import LocalImagesExample from './LocalImagesExample'
|
||||
import StatusBarUnderlay, { STATUS_BAR_HEIGHT } from './StatusBarUnderlay'
|
||||
import AutoSizeExample from './AutoSizeExample'
|
||||
|
||||
const FastImageExample = () => (
|
||||
<View style={styles.container}>
|
||||
<StatusBar
|
||||
translucent
|
||||
barStyle="dark-content"
|
||||
backgroundColor="transparent"
|
||||
/>
|
||||
<ScrollView
|
||||
style={styles.scrollContainer}
|
||||
contentContainerStyle={styles.scrollContentContainer}
|
||||
>
|
||||
<View style={styles.contentContainer}>
|
||||
<Section>
|
||||
<Text style={styles.titleText}>🚩 FastImage</Text>
|
||||
<FeatureText text="Tap images to reload examples." />
|
||||
</Section>
|
||||
<PriorityExample />
|
||||
<GifExample />
|
||||
<BorderRadiusExample />
|
||||
<ProgressExample />
|
||||
<PreloadExample />
|
||||
<ResizeModeExample />
|
||||
<LocalImagesExample />
|
||||
<AutoSizeExample />
|
||||
</View>
|
||||
</ScrollView>
|
||||
<StatusBarUnderlay />
|
||||
</View>
|
||||
)
|
||||
|
||||
FastImageExample.navigationOptions = {
|
||||
tabBarLabel: 'FastImage Example',
|
||||
tabBarIcon: props => (
|
||||
<Icon
|
||||
name="ios-information-circle"
|
||||
{...props}
|
||||
/>
|
||||
),
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
titleText: {
|
||||
fontWeight: '900',
|
||||
marginBottom: 20,
|
||||
color: '#222',
|
||||
},
|
||||
contentContainer: {
|
||||
marginTop: 20,
|
||||
},
|
||||
image: {
|
||||
flex: 1,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 10,
|
||||
},
|
||||
container: {
|
||||
flex: 1,
|
||||
alignItems: 'stretch',
|
||||
backgroundColor: '#fff',
|
||||
},
|
||||
scrollContainer: {
|
||||
marginTop: STATUS_BAR_HEIGHT,
|
||||
},
|
||||
scrollContentContainer: {
|
||||
alignItems: 'stretch',
|
||||
flex: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default FastImageExample
|
15
react-native-fast-image-example-cocoapods/src/FastImageGrid.js
vendored
Normal file
15
react-native-fast-image-example-cocoapods/src/FastImageGrid.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import React from 'react'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Icon from './Icons/Icon'
|
||||
import ImageGrid from './ImageGrid'
|
||||
|
||||
const FastImageGrid = () => <ImageGrid ImageComponent={FastImage} />
|
||||
|
||||
FastImageGrid.navigationOptions = {
|
||||
tabBarLabel: 'FastImage Grid',
|
||||
tabBarIcon: props => (
|
||||
<Icon name="ios-photos" {...props} />
|
||||
),
|
||||
}
|
||||
|
||||
export default FastImageGrid
|
12
react-native-fast-image-example-cocoapods/src/FeatureText.js
vendored
Normal file
12
react-native-fast-image-example-cocoapods/src/FeatureText.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text } from 'react-native'
|
||||
|
||||
export default ({ text, style, children }) => (
|
||||
<Text style={[styles.style, style]}>{text || children}</Text>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
style: {
|
||||
color: '#222',
|
||||
},
|
||||
})
|
33
react-native-fast-image-example-cocoapods/src/GifExample.js
vendored
Normal file
33
react-native-fast-image-example-cocoapods/src/GifExample.js
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const GIF_URL =
|
||||
'https://cdn-images-1.medium.com/max/1600/1*-CY5bU4OqiJRox7G00sftw.gif'
|
||||
|
||||
const GifExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• GIF support." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<FastImage style={styles.image} source={{ uri: GIF_URL + bust }} />
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
height: 100,
|
||||
width: 100,
|
||||
flex: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(GifExample)
|
17
react-native-fast-image-example-cocoapods/src/Icons/Icon.js
vendored
Normal file
17
react-native-fast-image-example-cocoapods/src/Icons/Icon.js
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import React from 'react'
|
||||
import Base from 'react-native-vector-icons/Ionicons'
|
||||
|
||||
const Icon = ({ size, name, tintColor }) => (
|
||||
<Base
|
||||
name={name}
|
||||
size={size}
|
||||
style={{ width: size, height: size }}
|
||||
color={tintColor}
|
||||
/>
|
||||
)
|
||||
|
||||
Icon.defaultProps = {
|
||||
size: 26,
|
||||
}
|
||||
|
||||
export default Icon
|
126
react-native-fast-image-example-cocoapods/src/ImageGrid.js
vendored
Normal file
126
react-native-fast-image-example-cocoapods/src/ImageGrid.js
vendored
Normal file
@ -0,0 +1,126 @@
|
||||
import React, { Component } from 'react'
|
||||
import { FlatList, StyleSheet, Text, View } from 'react-native'
|
||||
import StatusBarUnderlay, { STATUS_BAR_HEIGHT } from './StatusBarUnderlay'
|
||||
|
||||
const getImageUrl = (id, width, height) =>
|
||||
`https://unsplash.it/${width}/${height}?image=${id}`
|
||||
|
||||
class ImageGrid extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
fetch('https://unsplash.it/list')
|
||||
.then(res => res.json())
|
||||
.then(this._onFetchImagesSuccess)
|
||||
.catch(this._onFetchImagesError)
|
||||
}
|
||||
|
||||
state = {
|
||||
images: [],
|
||||
itemHeight: 0,
|
||||
}
|
||||
|
||||
_onLayout = e => {
|
||||
const width = e.nativeEvent.layout.width
|
||||
this.setState({
|
||||
itemHeight: width / 4,
|
||||
})
|
||||
}
|
||||
|
||||
_onFetchImagesError = () => {
|
||||
this.setState({
|
||||
error: true,
|
||||
})
|
||||
}
|
||||
|
||||
_onFetchImagesSuccess = images => {
|
||||
this.setState({
|
||||
images,
|
||||
})
|
||||
}
|
||||
|
||||
_getItemLayout = (data, index) => {
|
||||
const { itemHeight } = this.state
|
||||
return { length: itemHeight, offset: itemHeight * index, index }
|
||||
}
|
||||
|
||||
_renderItem = ({ item }) => {
|
||||
const ImageComponent = this.props.ImageComponent
|
||||
const uri = getImageUrl(item.id, 100, 100)
|
||||
return (
|
||||
<View style={styles.imageContainer}>
|
||||
<ImageComponent source={{ uri }} style={styles.image} />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
_extractKey = item => {
|
||||
return item.id
|
||||
}
|
||||
|
||||
render() {
|
||||
if (this.state.error) {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.text}>Error fetching images.</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<FlatList
|
||||
onLayout={this._onLayout}
|
||||
style={styles.list}
|
||||
columnWrapperStyle={[
|
||||
styles.columnWrapper,
|
||||
{ height: this.state.itemHeight },
|
||||
]}
|
||||
data={this.state.images}
|
||||
renderItem={this._renderItem}
|
||||
numColumns={4}
|
||||
keyExtractor={this._extractKey}
|
||||
getItemLayout={this._getItemLayout}
|
||||
/>
|
||||
<StatusBarUnderlay />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const MARGIN = 2
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: '#fff',
|
||||
alignItems: 'stretch',
|
||||
justifyContent: 'center',
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
text: {
|
||||
textAlign: 'center',
|
||||
},
|
||||
list: {
|
||||
marginTop: STATUS_BAR_HEIGHT,
|
||||
flex: 1,
|
||||
},
|
||||
columnWrapper: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
marginLeft: -MARGIN,
|
||||
marginRight: -MARGIN,
|
||||
},
|
||||
image: {
|
||||
flex: 1,
|
||||
width: null,
|
||||
height: null,
|
||||
margin: MARGIN,
|
||||
backgroundColor: '#eee',
|
||||
},
|
||||
imageContainer: {
|
||||
flex: 1,
|
||||
alignItems: 'stretch',
|
||||
},
|
||||
})
|
||||
|
||||
export default ImageGrid
|
152
react-native-fast-image-example-cocoapods/src/LocalImagesExample.js
vendored
Normal file
152
react-native-fast-image-example-cocoapods/src/LocalImagesExample.js
vendored
Normal file
@ -0,0 +1,152 @@
|
||||
import React, { Component } from 'react'
|
||||
import { StyleSheet, View, Text, TouchableOpacity } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
import FieldsImage from './images/fields.jpg'
|
||||
import FieldsBase64 from './images/fields.js'
|
||||
import JellyfishImage from './images/jellyfish.gif'
|
||||
import ImagePicker from 'react-native-image-picker'
|
||||
import BulletText from './BulletText'
|
||||
|
||||
var options = {
|
||||
title: 'Select Avatar',
|
||||
customButtons: [{ name: 'fb', title: 'Choose Photo from Facebook' }],
|
||||
storageOptions: {
|
||||
skipBackup: true,
|
||||
path: 'images',
|
||||
},
|
||||
}
|
||||
|
||||
const Image = ({ source, ...p }) => (
|
||||
<FastImage style={styles.imageSquare} source={source} {...p} />
|
||||
)
|
||||
|
||||
const Row = p => <View style={styles.row} {...p} />
|
||||
|
||||
class PhotoExample extends Component {
|
||||
state = {}
|
||||
|
||||
pick = () => {
|
||||
ImagePicker.showImagePicker(options, response => {
|
||||
console.log('Response = ', response)
|
||||
if (response.didCancel) {
|
||||
console.log('User cancelled image picker')
|
||||
} else if (response.error) {
|
||||
console.log('ImagePicker Error: ', response.error)
|
||||
} else if (response.customButton) {
|
||||
console.log(
|
||||
'User tapped custom button: ',
|
||||
response.customButton,
|
||||
)
|
||||
} else {
|
||||
const fileUri = `file://${response.path}`
|
||||
const uri = response.uri
|
||||
this.setState({
|
||||
image: { uri: uri },
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Row>
|
||||
<BulletText>photo library</BulletText>
|
||||
<TouchableOpacity onPress={this.pick}>
|
||||
<Image style={styles.imageSquare} source={this.state.image}>
|
||||
<Text style={{ color: 'white', fontWeight: '900' }}>
|
||||
Pick Photo
|
||||
</Text>
|
||||
</Image>
|
||||
</TouchableOpacity>
|
||||
</Row>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const Require = () => (
|
||||
<React.Fragment>
|
||||
<BulletText>require</BulletText>
|
||||
<Image source={require('./images/fields.jpg')} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
const Import = () => (
|
||||
<React.Fragment>
|
||||
<BulletText>import</BulletText>
|
||||
<Image source={FieldsImage} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
const GIF = () => (
|
||||
<React.Fragment>
|
||||
<BulletText>gif</BulletText>
|
||||
<Image source={JellyfishImage} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
const Base64 = () => (
|
||||
<React.Fragment>
|
||||
<BulletText>base64</BulletText>
|
||||
<Image source={{ uri: FieldsBase64 }} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
const LocalImagesExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText>• Local images.</FeatureText>
|
||||
</Section>
|
||||
<View style={styles.container}>
|
||||
<Row>
|
||||
<Require />
|
||||
</Row>
|
||||
<Row>
|
||||
<Import />
|
||||
</Row>
|
||||
<Row>
|
||||
<GIF />
|
||||
</Row>
|
||||
<Row>
|
||||
<Base64 />
|
||||
</Row>
|
||||
<PhotoExample />
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
row: {
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
marginBottom: 20,
|
||||
},
|
||||
container: {
|
||||
backgroundColor: '#eee',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
paddingTop: 10,
|
||||
paddingBottom: 10,
|
||||
},
|
||||
imageSquare: {
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
marginTop: 10,
|
||||
width: 100,
|
||||
flex: 0,
|
||||
},
|
||||
plus: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
position: 'absolute',
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(LocalImagesExample)
|
96
react-native-fast-image-example-cocoapods/src/PreloadExample.js
vendored
Normal file
96
react-native-fast-image-example-cocoapods/src/PreloadExample.js
vendored
Normal file
@ -0,0 +1,96 @@
|
||||
import React, { Component } from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
import uuid from 'uuid/v4'
|
||||
import Button from './Button'
|
||||
import { createImageProgress } from 'react-native-image-progress'
|
||||
|
||||
const IMAGE_URL =
|
||||
'https://cdn-images-1.medium.com/max/1600/1*-CY5bU4OqiJRox7G00sftw.gif'
|
||||
|
||||
const Image = createImageProgress(FastImage)
|
||||
|
||||
class PreloadExample extends Component {
|
||||
state = {
|
||||
show: false,
|
||||
url: IMAGE_URL,
|
||||
}
|
||||
|
||||
bustCache = () => {
|
||||
const key = uuid()
|
||||
const bust = `?bust=${key}`
|
||||
// Preload images. This can be called anywhere.
|
||||
const url = IMAGE_URL + bust
|
||||
this.setState({
|
||||
url,
|
||||
show: false,
|
||||
})
|
||||
}
|
||||
|
||||
preload = () => {
|
||||
FastImage.preload([{ uri: this.state.url }])
|
||||
}
|
||||
|
||||
showImage = () => {
|
||||
this.setState({ show: true })
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Preloading." />
|
||||
<FeatureText text="• Progress indication using react-native-image-progress." />
|
||||
</Section>
|
||||
<SectionFlex
|
||||
style={styles.section}
|
||||
onPress={this.props.onPressReload}
|
||||
>
|
||||
{this.state.show ? (
|
||||
<Image
|
||||
style={styles.image}
|
||||
source={{ uri: this.state.url }}
|
||||
/>
|
||||
) : (
|
||||
<View style={styles.image} />
|
||||
)}
|
||||
<View style={styles.buttons}>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Button text="Bust" onPress={this.bustCache} />
|
||||
</View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Button text="Preload" onPress={this.preload} />
|
||||
</View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Button text="Render" onPress={this.showImage} />
|
||||
</View>
|
||||
</View>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
section: {
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
},
|
||||
buttons: {
|
||||
flexDirection: 'row',
|
||||
marginHorizontal: 20,
|
||||
marginBottom: 10,
|
||||
},
|
||||
image: {
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
marginBottom: 10,
|
||||
height: 100,
|
||||
width: 100,
|
||||
},
|
||||
})
|
||||
|
||||
export default PreloadExample
|
60
react-native-fast-image-example-cocoapods/src/PriorityExample.js
vendored
Normal file
60
react-native-fast-image-example-cocoapods/src/PriorityExample.js
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
import React from 'react'
|
||||
import { PixelRatio, StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const getImageUrl = (id, width, height) =>
|
||||
`https://source.unsplash.com/${id}/${width}x${height}`
|
||||
const IMAGE_SIZE = 1024
|
||||
const IMAGE_SIZE_PX = PixelRatio.getPixelSizeForLayoutSize(IMAGE_SIZE)
|
||||
const IMAGE_URLS = [
|
||||
getImageUrl('x58soEovG_M', IMAGE_SIZE_PX, IMAGE_SIZE_PX),
|
||||
getImageUrl('yPI7myL5eWY', IMAGE_SIZE_PX, IMAGE_SIZE_PX),
|
||||
getImageUrl('S7VCcp6KCKE', IMAGE_SIZE, IMAGE_SIZE),
|
||||
]
|
||||
|
||||
const PriorityExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Prioritize images (low, normal, high)." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URLS[0] + bust,
|
||||
priority: FastImage.priority.low,
|
||||
}}
|
||||
/>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URLS[1] + bust,
|
||||
priority: FastImage.priority.normal,
|
||||
}}
|
||||
/>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URLS[2] + bust,
|
||||
priority: FastImage.priority.high,
|
||||
}}
|
||||
/>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
flex: 1,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 10,
|
||||
marginVertical: 20,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(PriorityExample)
|
81
react-native-fast-image-example-cocoapods/src/ProgressExample.js
vendored
Normal file
81
react-native-fast-image-example-cocoapods/src/ProgressExample.js
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
import React, { Component } from 'react'
|
||||
import { StyleSheet, View, Text } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const IMAGE_URL = 'https://media.giphy.com/media/GEsoqZDGVoisw/giphy.gif'
|
||||
|
||||
class ProgressExample extends Component {
|
||||
state = {
|
||||
mount: new Date(),
|
||||
start: undefined,
|
||||
progress: undefined,
|
||||
end: undefined,
|
||||
}
|
||||
|
||||
render() {
|
||||
const { onPressReload, bust } = this.props
|
||||
const { mount, start, progress, end } = this.state
|
||||
return (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Progress callbacks." />
|
||||
</Section>
|
||||
<SectionFlex
|
||||
onPress={onPressReload}
|
||||
style={{
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
paddingBottom: 20,
|
||||
}}
|
||||
>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URL + bust,
|
||||
}}
|
||||
onLoadStart={() => this.setState({ start: Date.now() })}
|
||||
onProgress={e =>
|
||||
this.setState({
|
||||
progress: Math.round(
|
||||
100 *
|
||||
(e.nativeEvent.loaded /
|
||||
e.nativeEvent.total),
|
||||
),
|
||||
})
|
||||
}
|
||||
onLoad={() => this.setState({ end: Date.now() })}
|
||||
onLoadEnd={() => {}}
|
||||
/>
|
||||
<Text>
|
||||
onLoadStart
|
||||
{start !== undefined && ` - ${start - mount} ms`}
|
||||
</Text>
|
||||
<Text>
|
||||
onProgress
|
||||
{progress !== undefined && ` - ${progress} %`}
|
||||
</Text>
|
||||
<Text>
|
||||
onLoad
|
||||
{end !== undefined && ` - ${end - mount} ms`}
|
||||
</Text>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
width: 100,
|
||||
flex: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(ProgressExample)
|
73
react-native-fast-image-example-cocoapods/src/ResizeModeExample.js
vendored
Normal file
73
react-native-fast-image-example-cocoapods/src/ResizeModeExample.js
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View, Text } from 'react-native'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
import BulletText from './BulletText'
|
||||
|
||||
const IMAGE_URL = 'https://media.giphy.com/media/GEsoqZDGVoisw/giphy.gif'
|
||||
|
||||
const Col = p => <View style={styles.col} {...p} />
|
||||
|
||||
const ResizeModeExample = () => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• resizeMode." />
|
||||
</Section>
|
||||
<SectionFlex style={styles.container}>
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.contain}
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<BulletText>contain</BulletText>
|
||||
</Col>
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.center}
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<BulletText>center</BulletText>
|
||||
</Col>
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.stretch}
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<BulletText>stretch</BulletText>
|
||||
</Col>
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.cover}
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<BulletText>cover</BulletText>
|
||||
</Col>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
height: 100,
|
||||
width: 50,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
marginTop: 0,
|
||||
marginBottom: 10,
|
||||
flex: 0,
|
||||
},
|
||||
container: {
|
||||
padding: 20,
|
||||
},
|
||||
col: {
|
||||
alignItems: 'center',
|
||||
},
|
||||
})
|
||||
|
||||
export default ResizeModeExample
|
13
react-native-fast-image-example-cocoapods/src/Section.js
vendored
Normal file
13
react-native-fast-image-example-cocoapods/src/Section.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
|
||||
export default ({ children }) => <View style={styles.section}>{children}</View>
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
section: {
|
||||
marginTop: 10,
|
||||
marginBottom: 10,
|
||||
marginLeft: 40,
|
||||
marginRight: 40,
|
||||
},
|
||||
})
|
21
react-native-fast-image-example-cocoapods/src/SectionFlex.js
vendored
Normal file
21
react-native-fast-image-example-cocoapods/src/SectionFlex.js
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, TouchableOpacity, View } from 'react-native'
|
||||
|
||||
export default ({ children, onPress, style }) =>
|
||||
onPress ? (
|
||||
<TouchableOpacity style={[styles.sectionFlex, style]} onPress={onPress}>
|
||||
{children}
|
||||
</TouchableOpacity>
|
||||
) : (
|
||||
<View style={[styles.sectionFlex, style]}>{children}</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
sectionFlex: {
|
||||
backgroundColor: '#eee',
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
marginLeft: -10,
|
||||
marginRight: -10,
|
||||
},
|
||||
})
|
18
react-native-fast-image-example-cocoapods/src/StatusBarUnderlay.js
vendored
Normal file
18
react-native-fast-image-example-cocoapods/src/StatusBarUnderlay.js
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
import React from 'react'
|
||||
import { Platform, StatusBar, StyleSheet, View } from 'react-native'
|
||||
import { getStatusBarHeight } from 'react-native-status-bar-height'
|
||||
|
||||
export const STATUS_BAR_HEIGHT = getStatusBarHeight()
|
||||
|
||||
export default () => <View style={styles.statusBarUnderlay} />
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
statusBarUnderlay: {
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: STATUS_BAR_HEIGHT,
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
})
|
BIN
react-native-fast-image-example-cocoapods/src/images/fields.jpg
Normal file
BIN
react-native-fast-image-example-cocoapods/src/images/fields.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
7
react-native-fast-image-example-cocoapods/src/images/fields.js
vendored
Normal file
7
react-native-fast-image-example-cocoapods/src/images/fields.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 104 KiB |
25
react-native-fast-image-example-cocoapods/src/index.js
vendored
Normal file
25
react-native-fast-image-example-cocoapods/src/index.js
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
import React from 'react'
|
||||
import { YellowBox } from 'react-native'
|
||||
import { createBottomTabNavigator } from 'react-navigation'
|
||||
import FastImageExamples from './FastImageExamples'
|
||||
import FastImageGrid from './FastImageGrid'
|
||||
import DefaultImageGrid from './DefaultImageGrid'
|
||||
|
||||
YellowBox.ignoreWarnings([
|
||||
'Warning: isMounted(...) is deprecated',
|
||||
'Module RCTImageLoader',
|
||||
])
|
||||
|
||||
const App = createBottomTabNavigator({
|
||||
fastImageExample: {
|
||||
screen: FastImageExamples,
|
||||
},
|
||||
image: {
|
||||
screen: DefaultImageGrid,
|
||||
},
|
||||
fastImage: {
|
||||
screen: FastImageGrid,
|
||||
},
|
||||
})
|
||||
|
||||
export default App
|
28
react-native-fast-image-example-cocoapods/src/withCacheBust.js
vendored
Normal file
28
react-native-fast-image-example-cocoapods/src/withCacheBust.js
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
import React, { Component } from 'react'
|
||||
import uuid from 'uuid/v4'
|
||||
|
||||
export default BaseComponent => {
|
||||
class WithCacheBust extends Component {
|
||||
state = { bust: '?bust' }
|
||||
|
||||
onPressReload = () => {
|
||||
// Force complete re-render and bust image cache.
|
||||
const key = uuid()
|
||||
const bust = `?bust=${key}`
|
||||
this.setState({ bust })
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<BaseComponent
|
||||
bust={this.state.bust}
|
||||
onPressReload={this.onPressReload}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
WithCacheBust.displayName = `withCacheBust${BaseComponent.displayName}`
|
||||
|
||||
return WithCacheBust
|
||||
}
|
@ -1378,6 +1378,10 @@ ci-info@^1.5.0:
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497"
|
||||
|
||||
clamp@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/clamp/-/clamp-1.0.1.tgz#66a0e64011816e37196828fdc8c8c147312c8634"
|
||||
|
||||
class-utils@^0.3.5:
|
||||
version "0.3.6"
|
||||
resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
|
||||
@ -1548,7 +1552,7 @@ cosmiconfig@^5.0.5:
|
||||
js-yaml "^3.9.0"
|
||||
parse-json "^4.0.0"
|
||||
|
||||
create-react-class@^15.6.3:
|
||||
create-react-class@^15.5.2, create-react-class@^15.6.3:
|
||||
version "15.6.3"
|
||||
resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.3.tgz#2d73237fb3f970ae6ebe011a9e66f46dbca80036"
|
||||
dependencies:
|
||||
@ -1556,6 +1560,13 @@ create-react-class@^15.6.3:
|
||||
loose-envify "^1.3.1"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
create-react-context@0.2.2:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca"
|
||||
dependencies:
|
||||
fbjs "^0.8.0"
|
||||
gud "^1.0.0"
|
||||
|
||||
cross-spawn@^5.0.1, cross-spawn@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
|
||||
@ -1954,7 +1965,7 @@ fbjs-scripts@^0.8.1:
|
||||
semver "^5.1.0"
|
||||
through2 "^2.0.0"
|
||||
|
||||
fbjs@0.8.17, fbjs@^0.8.9:
|
||||
fbjs@0.8.17, fbjs@^0.8.0, fbjs@^0.8.9:
|
||||
version "0.8.17"
|
||||
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd"
|
||||
dependencies:
|
||||
@ -2184,6 +2195,10 @@ growly@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
|
||||
|
||||
gud@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0"
|
||||
|
||||
handlebars@^4.0.3:
|
||||
version "4.0.12"
|
||||
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5"
|
||||
@ -2260,6 +2275,10 @@ has@^1.0.1:
|
||||
dependencies:
|
||||
function-bind "^1.1.1"
|
||||
|
||||
hoist-non-react-statics@^2.2.0, hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0:
|
||||
version "2.5.5"
|
||||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47"
|
||||
|
||||
home-or-tmp@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
|
||||
@ -2559,6 +2578,10 @@ is-windows@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
|
||||
|
||||
isarray@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
|
||||
|
||||
isarray@1.0.0, isarray@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||
@ -3162,7 +3185,7 @@ lodash.throttle@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
|
||||
|
||||
lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1:
|
||||
lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1:
|
||||
version "4.17.11"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
|
||||
|
||||
@ -3868,6 +3891,12 @@ path-parse@^1.0.5:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
|
||||
|
||||
path-to-regexp@^1.7.0:
|
||||
version "1.7.0"
|
||||
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d"
|
||||
dependencies:
|
||||
isarray "0.0.1"
|
||||
|
||||
path-type@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
|
||||
@ -3998,7 +4027,7 @@ prompts@^0.1.9:
|
||||
kleur "^2.0.1"
|
||||
sisteransi "^0.1.1"
|
||||
|
||||
prop-types@^15.5.8, prop-types@^15.6.2:
|
||||
prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2:
|
||||
version "15.6.2"
|
||||
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102"
|
||||
dependencies:
|
||||
@ -4025,6 +4054,13 @@ qs@~6.5.2:
|
||||
version "6.5.2"
|
||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
|
||||
|
||||
query-string@^6.1.0:
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.1.0.tgz#01e7d69f6a0940dac67a937d6c6325647aa4532a"
|
||||
dependencies:
|
||||
decode-uri-component "^0.2.0"
|
||||
strict-uri-encode "^2.0.0"
|
||||
|
||||
randomatic@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.0.tgz#36f2ca708e9e567f5ed2ec01949026d50aa10116"
|
||||
@ -4065,6 +4101,74 @@ react-is@^16.5.0:
|
||||
version "16.5.2"
|
||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.5.2.tgz#e2a7b7c3f5d48062eb769fcb123505eb928722e3"
|
||||
|
||||
react-lifecycles-compat@^3, react-lifecycles-compat@^3.0.4:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
|
||||
|
||||
react-native-dismiss-keyboard@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-dismiss-keyboard/-/react-native-dismiss-keyboard-1.0.0.tgz#32886242b3f2317e121f3aeb9b0a585e2b879b49"
|
||||
|
||||
react-native-drawer-layout-polyfill@^1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native-drawer-layout-polyfill/-/react-native-drawer-layout-polyfill-1.3.2.tgz#192c84d7a5a6b8a6d2be2c7daa5e4164518d0cc7"
|
||||
dependencies:
|
||||
react-native-drawer-layout "1.3.2"
|
||||
|
||||
react-native-drawer-layout@1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native-drawer-layout/-/react-native-drawer-layout-1.3.2.tgz#b9740d7663a1dc4f88a61b9c6d93d2d948ea426e"
|
||||
dependencies:
|
||||
react-native-dismiss-keyboard "1.0.0"
|
||||
|
||||
react-native-fast-image@^5.0.9:
|
||||
version "5.0.9"
|
||||
resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-5.0.9.tgz#31dbe2cff430306e0bd2e23d0610df297cb0eae9"
|
||||
|
||||
react-native-image-picker@^0.26.10:
|
||||
version "0.26.10"
|
||||
resolved "https://registry.yarnpkg.com/react-native-image-picker/-/react-native-image-picker-0.26.10.tgz#0bb9ab928984948c67aee0b9e64216bee007a9fc"
|
||||
|
||||
react-native-image-progress@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-image-progress/-/react-native-image-progress-1.1.1.tgz#95bbe0875c7ebd54286df69cb37b598b94c54eb0"
|
||||
dependencies:
|
||||
prop-types "^15.5.10"
|
||||
|
||||
react-native-safe-area-view@0.11.0:
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.11.0.tgz#4f3dda43c2bace37965e7c6aef5fc83d4f19d174"
|
||||
dependencies:
|
||||
hoist-non-react-statics "^2.3.1"
|
||||
|
||||
react-native-screens@^1.0.0-alpha.11:
|
||||
version "1.0.0-alpha.12"
|
||||
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.12.tgz#5953c39c9dbfbe324610005e07d85a416081c48c"
|
||||
|
||||
react-native-status-bar-height@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-status-bar-height/-/react-native-status-bar-height-2.1.0.tgz#cb70fcdbb8dfdf0b9140d77625d27e4ea32fd7f4"
|
||||
|
||||
react-native-tab-view@^0.0.77:
|
||||
version "0.0.77"
|
||||
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.77.tgz#11ceb8e7c23100d07e628dc151b57797524d00d4"
|
||||
dependencies:
|
||||
prop-types "^15.6.0"
|
||||
|
||||
react-native-tab-view@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.0.2.tgz#66e0bc6d38a227ed2b212e3a256b7902f6ce02ed"
|
||||
dependencies:
|
||||
prop-types "^15.6.1"
|
||||
|
||||
react-native-vector-icons@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-5.0.0.tgz#d0bd6fdda01159db409810718dd04904951a98f5"
|
||||
dependencies:
|
||||
lodash "^4.0.0"
|
||||
prop-types "^15.5.10"
|
||||
yargs "^8.0.2"
|
||||
|
||||
react-native@0.57.1:
|
||||
version "0.57.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.57.1.tgz#a8bffeac13e200b95bbebd11f7131570902e1e74"
|
||||
@ -4121,6 +4225,48 @@ react-native@0.57.1:
|
||||
xmldoc "^0.4.0"
|
||||
yargs "^9.0.0"
|
||||
|
||||
react-navigation-deprecated-tab-navigator@1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-deprecated-tab-navigator/-/react-navigation-deprecated-tab-navigator-1.3.0.tgz#015dcae1e977b984ca7e99245261c15439026bb7"
|
||||
dependencies:
|
||||
react-native-tab-view "^0.0.77"
|
||||
|
||||
react-navigation-drawer@0.5.0:
|
||||
version "0.5.0"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.5.0.tgz#d91b6a6ec65c34ba78c00f814b1e6508922cc9ec"
|
||||
dependencies:
|
||||
react-native-drawer-layout-polyfill "^1.3.2"
|
||||
|
||||
react-navigation-stack@0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-0.6.0.tgz#57dd25d0902137b950795549c43f3608e9edc250"
|
||||
|
||||
react-navigation-tabs@0.8.2:
|
||||
version "0.8.2"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.8.2.tgz#65f8a6ce368684227603345b4d312da2ef3366e1"
|
||||
dependencies:
|
||||
hoist-non-react-statics "^2.5.0"
|
||||
prop-types "^15.6.1"
|
||||
react-lifecycles-compat "^3.0.4"
|
||||
react-native-tab-view "^1.0.0"
|
||||
|
||||
react-navigation@^2.16.0:
|
||||
version "2.16.0"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.16.0.tgz#9b9320801700baac50e49e87a63641a4df179230"
|
||||
dependencies:
|
||||
clamp "^1.0.1"
|
||||
create-react-context "0.2.2"
|
||||
hoist-non-react-statics "^2.2.0"
|
||||
path-to-regexp "^1.7.0"
|
||||
query-string "^6.1.0"
|
||||
react-lifecycles-compat "^3"
|
||||
react-native-safe-area-view "0.11.0"
|
||||
react-native-screens "^1.0.0-alpha.11"
|
||||
react-navigation-deprecated-tab-navigator "1.3.0"
|
||||
react-navigation-drawer "0.5.0"
|
||||
react-navigation-stack "0.6.0"
|
||||
react-navigation-tabs "0.8.2"
|
||||
|
||||
react-proxy@^1.1.7:
|
||||
version "1.1.8"
|
||||
resolved "https://registry.yarnpkg.com/react-proxy/-/react-proxy-1.1.8.tgz#9dbfd9d927528c3aa9f444e4558c37830ab8c26a"
|
||||
@ -4137,6 +4283,14 @@ react-test-renderer@16.5.0:
|
||||
react-is "^16.5.0"
|
||||
schedule "^0.3.0"
|
||||
|
||||
react-timeout@^1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/react-timeout/-/react-timeout-1.1.2.tgz#df6da252abf16d5542abdf12e14999930c7cde9f"
|
||||
dependencies:
|
||||
create-react-class "^15.5.2"
|
||||
hoist-non-react-statics "^2.3.1"
|
||||
object-assign "^4.0.1"
|
||||
|
||||
react-timer-mixin@^0.13.2:
|
||||
version "0.13.4"
|
||||
resolved "https://registry.yarnpkg.com/react-timer-mixin/-/react-timer-mixin-0.13.4.tgz#75a00c3c94c13abe29b43d63b4c65a88fc8264d3"
|
||||
@ -4688,6 +4842,10 @@ stream-buffers@~2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4"
|
||||
|
||||
strict-uri-encode@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
|
||||
|
||||
string-length@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed"
|
||||
@ -5210,6 +5368,24 @@ yargs@^11.0.0:
|
||||
y18n "^3.2.1"
|
||||
yargs-parser "^9.0.2"
|
||||
|
||||
yargs@^8.0.2:
|
||||
version "8.0.2"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360"
|
||||
dependencies:
|
||||
camelcase "^4.1.0"
|
||||
cliui "^3.2.0"
|
||||
decamelize "^1.1.1"
|
||||
get-caller-file "^1.0.1"
|
||||
os-locale "^2.0.0"
|
||||
read-pkg-up "^2.0.0"
|
||||
require-directory "^2.1.1"
|
||||
require-main-filename "^1.0.1"
|
||||
set-blocking "^2.0.0"
|
||||
string-width "^2.0.0"
|
||||
which-module "^2.0.0"
|
||||
y18n "^3.2.1"
|
||||
yargs-parser "^7.0.0"
|
||||
|
||||
yargs@^9.0.0:
|
||||
version "9.0.1"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c"
|
||||
|
49
react-native-fast-image-example/App.js
vendored
49
react-native-fast-image-example/App.js
vendored
@ -1,49 +0,0 @@
|
||||
/**
|
||||
* Sample React Native App
|
||||
* https://github.com/facebook/react-native
|
||||
*
|
||||
* @format
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import React, {Component} from 'react';
|
||||
import {Platform, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
const instructions = Platform.select({
|
||||
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
|
||||
android:
|
||||
'Double tap R on your keyboard to reload,\n' +
|
||||
'Shake or press menu button for dev menu',
|
||||
});
|
||||
|
||||
type Props = {};
|
||||
export default class App extends Component<Props> {
|
||||
render() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.welcome}>Welcome to React Native!</Text>
|
||||
<Text style={styles.instructions}>To get started, edit App.js</Text>
|
||||
<Text style={styles.instructions}>{instructions}</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#F5FCFF',
|
||||
},
|
||||
welcome: {
|
||||
fontSize: 20,
|
||||
textAlign: 'center',
|
||||
margin: 10,
|
||||
},
|
||||
instructions: {
|
||||
textAlign: 'center',
|
||||
color: '#333333',
|
||||
marginBottom: 5,
|
||||
},
|
||||
});
|
@ -137,6 +137,9 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':react-native-image-picker')
|
||||
implementation project(':react-native-vector-icons')
|
||||
implementation project(':react-native-fast-image')
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
|
Binary file not shown.
Binary file not shown.
BIN
react-native-fast-image-example/android/app/src/main/assets/fonts/Feather.ttf
Executable file
BIN
react-native-fast-image-example/android/app/src/main/assets/fonts/Feather.ttf
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,6 +3,9 @@ package com.reactnativefastimageexample;
|
||||
import android.app.Application;
|
||||
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.oblador.vectoricons.VectorIconsPackage;
|
||||
import com.imagepicker.ImagePickerPackage;
|
||||
import com.dylanvann.fastimage.FastImageViewPackage;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
@ -22,7 +25,10 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
return Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage()
|
||||
new MainReactPackage(),
|
||||
new ImagePickerPackage(),
|
||||
new VectorIconsPackage(),
|
||||
new FastImageViewPackage()
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
rootProject.name = 'ReactNativeFastImageExample'
|
||||
include ':react-native-vector-icons'
|
||||
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
|
||||
include ':react-native-image-picker'
|
||||
project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android')
|
||||
include ':react-native-fast-image'
|
||||
project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fast-image/android')
|
||||
|
||||
include ':app'
|
||||
|
2
react-native-fast-image-example/index.js
vendored
2
react-native-fast-image-example/index.js
vendored
@ -1,7 +1,7 @@
|
||||
/** @format */
|
||||
|
||||
import {AppRegistry} from 'react-native';
|
||||
import App from './App';
|
||||
import App from './src';
|
||||
import {name as appName} from './app.json';
|
||||
|
||||
AppRegistry.registerComponent(appName, () => App);
|
||||
|
@ -13,6 +13,8 @@
|
||||
00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
|
||||
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
|
||||
00E356F31AD99517003FC87E /* ReactNativeFastImageExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ReactNativeFastImageExampleTests.m */; };
|
||||
07F1C7D502C34738AD31CA01 /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2FBF284EF5F5403F8D2C4084 /* Foundation.ttf */; };
|
||||
0F48E6BCA4334E1EB23C6EFF /* libFastImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FB584E6D3ED447B6BD4D0298 /* libFastImage.a */; };
|
||||
11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
|
||||
133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
|
||||
139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
|
||||
@ -23,6 +25,10 @@
|
||||
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
|
||||
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
|
||||
181FE53339AA49138E643415 /* libRNImagePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8FA815B70A0B47E9BA4A4535 /* libRNImagePicker.a */; };
|
||||
182DB0F9163949818E072D41 /* EvilIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = AC621598D850496AA2CC28A9 /* EvilIcons.ttf */; };
|
||||
2134B440FBEC4C8A8898456A /* Entypo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = CC5C8467BEA4434CB4F0A4C2 /* Entypo.ttf */; };
|
||||
26E471EA01514D51B2CB3912 /* libRNVectorIcons.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7253E12B5DA449569740E78E /* libRNVectorIcons.a */; };
|
||||
2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
|
||||
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
||||
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||
@ -36,8 +42,19 @@
|
||||
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
|
||||
2DCD954D1E0B4F2C00145EB5 /* ReactNativeFastImageExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ReactNativeFastImageExampleTests.m */; };
|
||||
2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
|
||||
2EEB5508DF2E44A783745707 /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F523341742B5475C9838AC2B /* Ionicons.ttf */; };
|
||||
3790641CED3C4809894F21D1 /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2D36B9E136BE4A9791DDF31D /* SimpleLineIcons.ttf */; };
|
||||
46691E49181C414C801A7F77 /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6CDE6852DD994A05BC5DB7EB /* Zocial.ttf */; };
|
||||
71D325E44C3145639B3DD690 /* MaterialCommunityIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1AB3F4100E5B45729370F1C0 /* MaterialCommunityIcons.ttf */; };
|
||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
|
||||
9BD19DF58C1947BA9A94C0B7 /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 96A510AB8A2A43BBAD318742 /* Octicons.ttf */; };
|
||||
A7011C727BA94FB38D963870 /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 70AA41A6F63F4BDE8EEA364A /* MaterialIcons.ttf */; };
|
||||
A7F46A6609274F9794D44D6E /* FontAwesome5_Brands.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 58B3C3BFD2A04FFF97358306 /* FontAwesome5_Brands.ttf */; };
|
||||
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
|
||||
B7CF1006472C40FDACA9D369 /* FontAwesome5_Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 683D81D56E3C4C96B329D155 /* FontAwesome5_Regular.ttf */; };
|
||||
C22FC406DE854FBC8369565E /* FontAwesome5_Solid.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 79B93072AA864502B95EAEFD /* FontAwesome5_Solid.ttf */; };
|
||||
CDB037ABC0D746BA84C5018F /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BD5F835BD4D340BF903485B4 /* FontAwesome.ttf */; };
|
||||
E27BAC5CE78143D1B6308551 /* Feather.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7DCF75AB6420407093594668 /* Feather.ttf */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@ -314,6 +331,27 @@
|
||||
remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
|
||||
remoteInfo = RCTBlob;
|
||||
};
|
||||
FC6543B82158571B00743247 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 8F52B124F5824D10ABF1101B /* FastImage.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A287971D1DE0C0A60081BDFA;
|
||||
remoteInfo = FastImage;
|
||||
};
|
||||
FC6543BB2158571B00743247 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = C2317C68D4404AF292523878 /* RNImagePicker.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 014A3B5C1C6CF33500B6D375;
|
||||
remoteInfo = RNImagePicker;
|
||||
};
|
||||
FC6543BE2158571B00743247 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = C324738FC9EA4946B72BB9CD /* RNVectorIcons.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 5DBEB1501B18CEA900B34395;
|
||||
remoteInfo = RNVectorIcons;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@ -336,13 +374,33 @@
|
||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ReactNativeFastImageExample/Info.plist; sourceTree = "<group>"; };
|
||||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ReactNativeFastImageExample/main.m; sourceTree = "<group>"; };
|
||||
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
|
||||
1AB3F4100E5B45729370F1C0 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialCommunityIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = "<group>"; };
|
||||
2D02E47B1E0B4A5D006451C7 /* ReactNativeFastImageExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ReactNativeFastImageExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D02E4901E0B4A5D006451C7 /* ReactNativeFastImageExample-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ReactNativeFastImageExample-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D36B9E136BE4A9791DDF31D /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = SimpleLineIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf"; sourceTree = "<group>"; };
|
||||
2FBF284EF5F5403F8D2C4084 /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = "<group>"; };
|
||||
58B3C3BFD2A04FFF97358306 /* FontAwesome5_Brands.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Brands.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf"; sourceTree = "<group>"; };
|
||||
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
|
||||
683D81D56E3C4C96B329D155 /* FontAwesome5_Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Regular.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf"; sourceTree = "<group>"; };
|
||||
6CDE6852DD994A05BC5DB7EB /* Zocial.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Zocial.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Zocial.ttf"; sourceTree = "<group>"; };
|
||||
70AA41A6F63F4BDE8EEA364A /* MaterialIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = "<group>"; };
|
||||
7253E12B5DA449569740E78E /* libRNVectorIcons.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNVectorIcons.a; sourceTree = "<group>"; };
|
||||
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
|
||||
79B93072AA864502B95EAEFD /* FontAwesome5_Solid.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Solid.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf"; sourceTree = "<group>"; };
|
||||
7DCF75AB6420407093594668 /* Feather.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Feather.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Feather.ttf"; sourceTree = "<group>"; };
|
||||
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
|
||||
8F52B124F5824D10ABF1101B /* FastImage.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = FastImage.xcodeproj; path = "../node_modules/react-native-fast-image/ios/FastImage.xcodeproj"; sourceTree = "<group>"; };
|
||||
8FA815B70A0B47E9BA4A4535 /* libRNImagePicker.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNImagePicker.a; sourceTree = "<group>"; };
|
||||
96A510AB8A2A43BBAD318742 /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = "<group>"; };
|
||||
AC621598D850496AA2CC28A9 /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = "<group>"; };
|
||||
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
|
||||
BD5F835BD4D340BF903485B4 /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = "<group>"; };
|
||||
C2317C68D4404AF292523878 /* RNImagePicker.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNImagePicker.xcodeproj; path = "../node_modules/react-native-image-picker/ios/RNImagePicker.xcodeproj"; sourceTree = "<group>"; };
|
||||
C324738FC9EA4946B72BB9CD /* RNVectorIcons.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNVectorIcons.xcodeproj; path = "../node_modules/react-native-vector-icons/RNVectorIcons.xcodeproj"; sourceTree = "<group>"; };
|
||||
CC5C8467BEA4434CB4F0A4C2 /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = "<group>"; };
|
||||
F523341742B5475C9838AC2B /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = "<group>"; };
|
||||
FB584E6D3ED447B6BD4D0298 /* libFastImage.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libFastImage.a; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -370,6 +428,9 @@
|
||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
|
||||
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
|
||||
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
|
||||
0F48E6BCA4334E1EB23C6EFF /* libFastImage.a in Frameworks */,
|
||||
26E471EA01514D51B2CB3912 /* libRNVectorIcons.a in Frameworks */,
|
||||
181FE53339AA49138E643415 /* libRNImagePicker.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -523,6 +584,27 @@
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
46A2237B60A94E46B23728FE /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CC5C8467BEA4434CB4F0A4C2 /* Entypo.ttf */,
|
||||
AC621598D850496AA2CC28A9 /* EvilIcons.ttf */,
|
||||
7DCF75AB6420407093594668 /* Feather.ttf */,
|
||||
BD5F835BD4D340BF903485B4 /* FontAwesome.ttf */,
|
||||
58B3C3BFD2A04FFF97358306 /* FontAwesome5_Brands.ttf */,
|
||||
683D81D56E3C4C96B329D155 /* FontAwesome5_Regular.ttf */,
|
||||
79B93072AA864502B95EAEFD /* FontAwesome5_Solid.ttf */,
|
||||
2FBF284EF5F5403F8D2C4084 /* Foundation.ttf */,
|
||||
F523341742B5475C9838AC2B /* Ionicons.ttf */,
|
||||
1AB3F4100E5B45729370F1C0 /* MaterialCommunityIcons.ttf */,
|
||||
70AA41A6F63F4BDE8EEA364A /* MaterialIcons.ttf */,
|
||||
96A510AB8A2A43BBAD318742 /* Octicons.ttf */,
|
||||
2D36B9E136BE4A9791DDF31D /* SimpleLineIcons.ttf */,
|
||||
6CDE6852DD994A05BC5DB7EB /* Zocial.ttf */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5E91572E1DD0AC6500FF2AA8 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -556,6 +638,9 @@
|
||||
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
|
||||
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
|
||||
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
|
||||
8F52B124F5824D10ABF1101B /* FastImage.xcodeproj */,
|
||||
C324738FC9EA4946B72BB9CD /* RNVectorIcons.xcodeproj */,
|
||||
C2317C68D4404AF292523878 /* RNImagePicker.xcodeproj */,
|
||||
);
|
||||
name = Libraries;
|
||||
sourceTree = "<group>";
|
||||
@ -577,6 +662,8 @@
|
||||
00E356EF1AD99517003FC87E /* ReactNativeFastImageExampleTests */,
|
||||
83CBBA001A601CBA00E9B192 /* Products */,
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
||||
46A2237B60A94E46B23728FE /* Resources */,
|
||||
FC65438A2158571800743247 /* Recovered References */,
|
||||
);
|
||||
indentWidth = 2;
|
||||
sourceTree = "<group>";
|
||||
@ -603,6 +690,40 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FC65438A2158571800743247 /* Recovered References */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FB584E6D3ED447B6BD4D0298 /* libFastImage.a */,
|
||||
7253E12B5DA449569740E78E /* libRNVectorIcons.a */,
|
||||
8FA815B70A0B47E9BA4A4535 /* libRNImagePicker.a */,
|
||||
);
|
||||
name = "Recovered References";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FC6543B12158571A00743247 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FC6543B92158571B00743247 /* libFastImage.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FC6543B32158571A00743247 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FC6543BF2158571B00743247 /* libRNVectorIcons.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FC6543B52158571A00743247 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FC6543BC2158571B00743247 /* libRNImagePicker.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@ -684,7 +805,7 @@
|
||||
83CBB9F71A601CBA00E9B192 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0940;
|
||||
LastUpgradeCheck = 940;
|
||||
ORGANIZATIONNAME = Facebook;
|
||||
TargetAttributes = {
|
||||
00E356ED1AD99517003FC87E = {
|
||||
@ -714,6 +835,10 @@
|
||||
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = FC6543B12158571A00743247 /* Products */;
|
||||
ProjectRef = 8F52B124F5824D10ABF1101B /* FastImage.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
|
||||
ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
|
||||
@ -762,6 +887,14 @@
|
||||
ProductGroup = 146834001AC3E56700842450 /* Products */;
|
||||
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = FC6543B52158571A00743247 /* Products */;
|
||||
ProjectRef = C2317C68D4404AF292523878 /* RNImagePicker.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = FC6543B32158571A00743247 /* Products */;
|
||||
ProjectRef = C324738FC9EA4946B72BB9CD /* RNVectorIcons.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
@ -1033,6 +1166,27 @@
|
||||
remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
FC6543B92158571B00743247 /* libFastImage.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libFastImage.a;
|
||||
remoteRef = FC6543B82158571B00743247 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
FC6543BC2158571B00743247 /* libRNImagePicker.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libRNImagePicker.a;
|
||||
remoteRef = FC6543BB2158571B00743247 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
FC6543BF2158571B00743247 /* libRNVectorIcons.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libRNVectorIcons.a;
|
||||
remoteRef = FC6543BE2158571B00743247 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
@ -1049,6 +1203,20 @@
|
||||
files = (
|
||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
||||
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
|
||||
2134B440FBEC4C8A8898456A /* Entypo.ttf in Resources */,
|
||||
182DB0F9163949818E072D41 /* EvilIcons.ttf in Resources */,
|
||||
E27BAC5CE78143D1B6308551 /* Feather.ttf in Resources */,
|
||||
CDB037ABC0D746BA84C5018F /* FontAwesome.ttf in Resources */,
|
||||
A7F46A6609274F9794D44D6E /* FontAwesome5_Brands.ttf in Resources */,
|
||||
B7CF1006472C40FDACA9D369 /* FontAwesome5_Regular.ttf in Resources */,
|
||||
C22FC406DE854FBC8369565E /* FontAwesome5_Solid.ttf in Resources */,
|
||||
07F1C7D502C34738AD31CA01 /* Foundation.ttf in Resources */,
|
||||
2EEB5508DF2E44A783745707 /* Ionicons.ttf in Resources */,
|
||||
71D325E44C3145639B3DD690 /* MaterialCommunityIcons.ttf in Resources */,
|
||||
A7011C727BA94FB38D963870 /* MaterialIcons.ttf in Resources */,
|
||||
9BD19DF58C1947BA9A94C0B7 /* Octicons.ttf in Resources */,
|
||||
3790641CED3C4809894F21D1 /* SimpleLineIcons.ttf in Resources */,
|
||||
46691E49181C414C801A7F77 /* Zocial.ttf in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -1171,9 +1339,21 @@
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = ReactNativeFastImageExampleTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
@ -1189,9 +1369,21 @@
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = ReactNativeFastImageExampleTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
@ -1208,6 +1400,12 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEAD_CODE_STRIPPING = NO;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = ReactNativeFastImageExample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
OTHER_LDFLAGS = (
|
||||
@ -1226,6 +1424,12 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = ReactNativeFastImageExample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
OTHER_LDFLAGS = (
|
||||
@ -1251,8 +1455,20 @@
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = "ReactNativeFastImageExample-tvOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
@ -1277,8 +1493,20 @@
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = "ReactNativeFastImageExample-tvOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
@ -1302,8 +1530,20 @@
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = "ReactNativeFastImageExample-tvOSTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
@ -1327,8 +1567,20 @@
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = "ReactNativeFastImageExample-tvOSTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
|
@ -25,7 +25,7 @@
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<string/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
@ -40,13 +40,10 @@
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>localhost</key>
|
||||
@ -56,5 +53,22 @@
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>Entypo.ttf</string>
|
||||
<string>EvilIcons.ttf</string>
|
||||
<string>Feather.ttf</string>
|
||||
<string>FontAwesome.ttf</string>
|
||||
<string>FontAwesome5_Brands.ttf</string>
|
||||
<string>FontAwesome5_Regular.ttf</string>
|
||||
<string>FontAwesome5_Solid.ttf</string>
|
||||
<string>Foundation.ttf</string>
|
||||
<string>Ionicons.ttf</string>
|
||||
<string>MaterialCommunityIcons.ttf</string>
|
||||
<string>MaterialIcons.ttf</string>
|
||||
<string>Octicons.ttf</string>
|
||||
<string>SimpleLineIcons.ttf</string>
|
||||
<string>Zocial.ttf</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -8,7 +8,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "16.5.0",
|
||||
"react-native": "0.57.1"
|
||||
"react-native": "0.57.1",
|
||||
"react-native-fast-image": "^5.0.9",
|
||||
"react-native-image-picker": "^0.26.10",
|
||||
"react-native-image-progress": "^1.1.1",
|
||||
"react-native-status-bar-height": "^2.1.0",
|
||||
"react-native-vector-icons": "^5.0.0",
|
||||
"react-navigation": "^2.16.0",
|
||||
"react-timeout": "^1.1.2",
|
||||
"uuid": "^3.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-jest": "23.6.0",
|
||||
@ -19,4 +27,4 @@
|
||||
"jest": {
|
||||
"preset": "react-native"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
72
react-native-fast-image-example/src/AutoSizeExample.js
vendored
Normal file
72
react-native-fast-image-example/src/AutoSizeExample.js
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
import React, { Component } from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const GIF_URL =
|
||||
'https://cdn-images-1.medium.com/max/1600/1*-CY5bU4OqiJRox7G00sftw.gif'
|
||||
|
||||
class AutoSizingImage extends Component {
|
||||
state = {
|
||||
height: 0,
|
||||
width: 0,
|
||||
}
|
||||
|
||||
onLoad = e => {
|
||||
const {
|
||||
nativeEvent: { width, height },
|
||||
} = e
|
||||
this.setState({ width, height })
|
||||
if (this.props.onLoad) this.props.onLoad(e)
|
||||
}
|
||||
|
||||
getHeight = () => {
|
||||
if (!this.state.height) return this.props.defaultHeight
|
||||
const ratio = this.state.height / this.state.width
|
||||
const height = this.props.width * ratio
|
||||
return height
|
||||
}
|
||||
|
||||
render() {
|
||||
const height = this.getHeight()
|
||||
return (
|
||||
<FastImage
|
||||
{...this.props}
|
||||
onLoad={this.onLoad}
|
||||
style={[{ width: this.props.width, height }, this.props.style]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
AutoSizingImage.defaultProps = {
|
||||
defaultHeight: 300,
|
||||
}
|
||||
|
||||
const AutoSizeExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• AutoSize." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<AutoSizingImage
|
||||
style={styles.image}
|
||||
width={200}
|
||||
source={{ uri: GIF_URL + bust }}
|
||||
/>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
flex: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(AutoSizeExample)
|
60
react-native-fast-image-example/src/BorderRadiusExample.js
vendored
Normal file
60
react-native-fast-image-example/src/BorderRadiusExample.js
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const IMAGE_URL = 'https://media.giphy.com/media/GEsoqZDGVoisw/giphy.gif'
|
||||
|
||||
const BorderRadiusExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Border radius." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<FastImage
|
||||
style={styles.imageSquare}
|
||||
source={{
|
||||
uri: IMAGE_URL + bust,
|
||||
}}
|
||||
/>
|
||||
<FastImage
|
||||
style={styles.imageRectangular}
|
||||
source={{
|
||||
uri: IMAGE_URL + bust,
|
||||
}}
|
||||
/>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
imageSquare: {
|
||||
borderRadius: 50,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
width: 100,
|
||||
flex: 0,
|
||||
},
|
||||
imageRectangular: {
|
||||
borderRadius: 50,
|
||||
borderTopLeftRadius: 10,
|
||||
borderBottomRightRadius: 10,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
flex: 1,
|
||||
},
|
||||
plus: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
position: 'absolute',
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(BorderRadiusExample)
|
8
react-native-fast-image-example/src/BulletText.js
vendored
Normal file
8
react-native-fast-image-example/src/BulletText.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import React from 'react'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const BulletText = ({ text, children }) => (
|
||||
<FeatureText text={`• ${text || children} •`} />
|
||||
)
|
||||
|
||||
export default BulletText
|
28
react-native-fast-image-example/src/Button.js
vendored
Normal file
28
react-native-fast-image-example/src/Button.js
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
|
||||
|
||||
const Button = ({ text, onPress }) => (
|
||||
<TouchableOpacity onPress={onPress}>
|
||||
<View style={styles.button}>
|
||||
<Text style={styles.text}>{text}</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
backgroundColor: 'black',
|
||||
margin: 10,
|
||||
height: 44,
|
||||
paddingLeft: 10,
|
||||
paddingRight: 10,
|
||||
borderRadius: 10,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
text: {
|
||||
color: 'white',
|
||||
},
|
||||
})
|
||||
|
||||
export default Button
|
16
react-native-fast-image-example/src/DefaultImageGrid.js
vendored
Normal file
16
react-native-fast-image-example/src/DefaultImageGrid.js
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
// @flow
|
||||
import React from 'react'
|
||||
import { Image } from 'react-native'
|
||||
import Icon from './Icons/Icon'
|
||||
import ImageGrid from './ImageGrid'
|
||||
|
||||
const DefaultImageGrid = () => <ImageGrid ImageComponent={Image} />
|
||||
|
||||
DefaultImageGrid.navigationOptions = {
|
||||
tabBarLabel: 'Image Grid',
|
||||
tabBarIcon: props => (
|
||||
<Icon name="ios-image" {...props} />
|
||||
),
|
||||
}
|
||||
|
||||
export default DefaultImageGrid
|
85
react-native-fast-image-example/src/FastImageExamples.js
vendored
Normal file
85
react-native-fast-image-example/src/FastImageExamples.js
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
import React from 'react'
|
||||
import { ScrollView, StatusBar, StyleSheet, Text, View } from 'react-native'
|
||||
import Icon from './Icons/Icon'
|
||||
import Section from './Section'
|
||||
import PriorityExample from './PriorityExample'
|
||||
import GifExample from './GifExample'
|
||||
import BorderRadiusExample from './BorderRadiusExample'
|
||||
import FeatureText from './FeatureText'
|
||||
import ProgressExample from './ProgressExample'
|
||||
import PreloadExample from './PreloadExample'
|
||||
import ResizeModeExample from './ResizeModeExample'
|
||||
import LocalImagesExample from './LocalImagesExample'
|
||||
import StatusBarUnderlay, { STATUS_BAR_HEIGHT } from './StatusBarUnderlay'
|
||||
import AutoSizeExample from './AutoSizeExample'
|
||||
|
||||
const FastImageExample = () => (
|
||||
<View style={styles.container}>
|
||||
<StatusBar
|
||||
translucent
|
||||
barStyle="dark-content"
|
||||
backgroundColor="transparent"
|
||||
/>
|
||||
<ScrollView
|
||||
style={styles.scrollContainer}
|
||||
contentContainerStyle={styles.scrollContentContainer}
|
||||
>
|
||||
<View style={styles.contentContainer}>
|
||||
<Section>
|
||||
<Text style={styles.titleText}>🚩 FastImage</Text>
|
||||
<FeatureText text="Tap images to reload examples." />
|
||||
</Section>
|
||||
<PriorityExample />
|
||||
<GifExample />
|
||||
<BorderRadiusExample />
|
||||
<ProgressExample />
|
||||
<PreloadExample />
|
||||
<ResizeModeExample />
|
||||
<LocalImagesExample />
|
||||
<AutoSizeExample />
|
||||
</View>
|
||||
</ScrollView>
|
||||
<StatusBarUnderlay />
|
||||
</View>
|
||||
)
|
||||
|
||||
FastImageExample.navigationOptions = {
|
||||
tabBarLabel: 'FastImage Example',
|
||||
tabBarIcon: props => (
|
||||
<Icon
|
||||
name="ios-information-circle"
|
||||
{...props}
|
||||
/>
|
||||
),
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
titleText: {
|
||||
fontWeight: '900',
|
||||
marginBottom: 20,
|
||||
color: '#222',
|
||||
},
|
||||
contentContainer: {
|
||||
marginTop: 20,
|
||||
},
|
||||
image: {
|
||||
flex: 1,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 10,
|
||||
},
|
||||
container: {
|
||||
flex: 1,
|
||||
alignItems: 'stretch',
|
||||
backgroundColor: '#fff',
|
||||
},
|
||||
scrollContainer: {
|
||||
marginTop: STATUS_BAR_HEIGHT,
|
||||
},
|
||||
scrollContentContainer: {
|
||||
alignItems: 'stretch',
|
||||
flex: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default FastImageExample
|
15
react-native-fast-image-example/src/FastImageGrid.js
vendored
Normal file
15
react-native-fast-image-example/src/FastImageGrid.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import React from 'react'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Icon from './Icons/Icon'
|
||||
import ImageGrid from './ImageGrid'
|
||||
|
||||
const FastImageGrid = () => <ImageGrid ImageComponent={FastImage} />
|
||||
|
||||
FastImageGrid.navigationOptions = {
|
||||
tabBarLabel: 'FastImage Grid',
|
||||
tabBarIcon: props => (
|
||||
<Icon name="ios-photos" {...props} />
|
||||
),
|
||||
}
|
||||
|
||||
export default FastImageGrid
|
12
react-native-fast-image-example/src/FeatureText.js
vendored
Normal file
12
react-native-fast-image-example/src/FeatureText.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text } from 'react-native'
|
||||
|
||||
export default ({ text, style, children }) => (
|
||||
<Text style={[styles.style, style]}>{text || children}</Text>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
style: {
|
||||
color: '#222',
|
||||
},
|
||||
})
|
33
react-native-fast-image-example/src/GifExample.js
vendored
Normal file
33
react-native-fast-image-example/src/GifExample.js
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const GIF_URL =
|
||||
'https://cdn-images-1.medium.com/max/1600/1*-CY5bU4OqiJRox7G00sftw.gif'
|
||||
|
||||
const GifExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• GIF support." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<FastImage style={styles.image} source={{ uri: GIF_URL + bust }} />
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
height: 100,
|
||||
width: 100,
|
||||
flex: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(GifExample)
|
17
react-native-fast-image-example/src/Icons/Icon.js
vendored
Normal file
17
react-native-fast-image-example/src/Icons/Icon.js
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import React from 'react'
|
||||
import Base from 'react-native-vector-icons/Ionicons'
|
||||
|
||||
const Icon = ({ size, name, tintColor }) => (
|
||||
<Base
|
||||
name={name}
|
||||
size={size}
|
||||
style={{ width: size, height: size }}
|
||||
color={tintColor}
|
||||
/>
|
||||
)
|
||||
|
||||
Icon.defaultProps = {
|
||||
size: 26,
|
||||
}
|
||||
|
||||
export default Icon
|
126
react-native-fast-image-example/src/ImageGrid.js
vendored
Normal file
126
react-native-fast-image-example/src/ImageGrid.js
vendored
Normal file
@ -0,0 +1,126 @@
|
||||
import React, { Component } from 'react'
|
||||
import { FlatList, StyleSheet, Text, View } from 'react-native'
|
||||
import StatusBarUnderlay, { STATUS_BAR_HEIGHT } from './StatusBarUnderlay'
|
||||
|
||||
const getImageUrl = (id, width, height) =>
|
||||
`https://unsplash.it/${width}/${height}?image=${id}`
|
||||
|
||||
class ImageGrid extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
fetch('https://unsplash.it/list')
|
||||
.then(res => res.json())
|
||||
.then(this._onFetchImagesSuccess)
|
||||
.catch(this._onFetchImagesError)
|
||||
}
|
||||
|
||||
state = {
|
||||
images: [],
|
||||
itemHeight: 0,
|
||||
}
|
||||
|
||||
_onLayout = e => {
|
||||
const width = e.nativeEvent.layout.width
|
||||
this.setState({
|
||||
itemHeight: width / 4,
|
||||
})
|
||||
}
|
||||
|
||||
_onFetchImagesError = () => {
|
||||
this.setState({
|
||||
error: true,
|
||||
})
|
||||
}
|
||||
|
||||
_onFetchImagesSuccess = images => {
|
||||
this.setState({
|
||||
images,
|
||||
})
|
||||
}
|
||||
|
||||
_getItemLayout = (data, index) => {
|
||||
const { itemHeight } = this.state
|
||||
return { length: itemHeight, offset: itemHeight * index, index }
|
||||
}
|
||||
|
||||
_renderItem = ({ item }) => {
|
||||
const ImageComponent = this.props.ImageComponent
|
||||
const uri = getImageUrl(item.id, 100, 100)
|
||||
return (
|
||||
<View style={styles.imageContainer}>
|
||||
<ImageComponent source={{ uri }} style={styles.image} />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
_extractKey = item => {
|
||||
return item.id
|
||||
}
|
||||
|
||||
render() {
|
||||
if (this.state.error) {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.text}>Error fetching images.</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<FlatList
|
||||
onLayout={this._onLayout}
|
||||
style={styles.list}
|
||||
columnWrapperStyle={[
|
||||
styles.columnWrapper,
|
||||
{ height: this.state.itemHeight },
|
||||
]}
|
||||
data={this.state.images}
|
||||
renderItem={this._renderItem}
|
||||
numColumns={4}
|
||||
keyExtractor={this._extractKey}
|
||||
getItemLayout={this._getItemLayout}
|
||||
/>
|
||||
<StatusBarUnderlay />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const MARGIN = 2
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: '#fff',
|
||||
alignItems: 'stretch',
|
||||
justifyContent: 'center',
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
text: {
|
||||
textAlign: 'center',
|
||||
},
|
||||
list: {
|
||||
marginTop: STATUS_BAR_HEIGHT,
|
||||
flex: 1,
|
||||
},
|
||||
columnWrapper: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
marginLeft: -MARGIN,
|
||||
marginRight: -MARGIN,
|
||||
},
|
||||
image: {
|
||||
flex: 1,
|
||||
width: null,
|
||||
height: null,
|
||||
margin: MARGIN,
|
||||
backgroundColor: '#eee',
|
||||
},
|
||||
imageContainer: {
|
||||
flex: 1,
|
||||
alignItems: 'stretch',
|
||||
},
|
||||
})
|
||||
|
||||
export default ImageGrid
|
152
react-native-fast-image-example/src/LocalImagesExample.js
vendored
Normal file
152
react-native-fast-image-example/src/LocalImagesExample.js
vendored
Normal file
@ -0,0 +1,152 @@
|
||||
import React, { Component } from 'react'
|
||||
import { StyleSheet, View, Text, TouchableOpacity } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
import FieldsImage from './images/fields.jpg'
|
||||
import FieldsBase64 from './images/fields.js'
|
||||
import JellyfishImage from './images/jellyfish.gif'
|
||||
import ImagePicker from 'react-native-image-picker'
|
||||
import BulletText from './BulletText'
|
||||
|
||||
var options = {
|
||||
title: 'Select Avatar',
|
||||
customButtons: [{ name: 'fb', title: 'Choose Photo from Facebook' }],
|
||||
storageOptions: {
|
||||
skipBackup: true,
|
||||
path: 'images',
|
||||
},
|
||||
}
|
||||
|
||||
const Image = ({ source, ...p }) => (
|
||||
<FastImage style={styles.imageSquare} source={source} {...p} />
|
||||
)
|
||||
|
||||
const Row = p => <View style={styles.row} {...p} />
|
||||
|
||||
class PhotoExample extends Component {
|
||||
state = {}
|
||||
|
||||
pick = () => {
|
||||
ImagePicker.showImagePicker(options, response => {
|
||||
console.log('Response = ', response)
|
||||
if (response.didCancel) {
|
||||
console.log('User cancelled image picker')
|
||||
} else if (response.error) {
|
||||
console.log('ImagePicker Error: ', response.error)
|
||||
} else if (response.customButton) {
|
||||
console.log(
|
||||
'User tapped custom button: ',
|
||||
response.customButton,
|
||||
)
|
||||
} else {
|
||||
const fileUri = `file://${response.path}`
|
||||
const uri = response.uri
|
||||
this.setState({
|
||||
image: { uri: uri },
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Row>
|
||||
<BulletText>photo library</BulletText>
|
||||
<TouchableOpacity onPress={this.pick}>
|
||||
<Image style={styles.imageSquare} source={this.state.image}>
|
||||
<Text style={{ color: 'white', fontWeight: '900' }}>
|
||||
Pick Photo
|
||||
</Text>
|
||||
</Image>
|
||||
</TouchableOpacity>
|
||||
</Row>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const Require = () => (
|
||||
<React.Fragment>
|
||||
<BulletText>require</BulletText>
|
||||
<Image source={require('./images/fields.jpg')} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
const Import = () => (
|
||||
<React.Fragment>
|
||||
<BulletText>import</BulletText>
|
||||
<Image source={FieldsImage} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
const GIF = () => (
|
||||
<React.Fragment>
|
||||
<BulletText>gif</BulletText>
|
||||
<Image source={JellyfishImage} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
const Base64 = () => (
|
||||
<React.Fragment>
|
||||
<BulletText>base64</BulletText>
|
||||
<Image source={{ uri: FieldsBase64 }} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
const LocalImagesExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText>• Local images.</FeatureText>
|
||||
</Section>
|
||||
<View style={styles.container}>
|
||||
<Row>
|
||||
<Require />
|
||||
</Row>
|
||||
<Row>
|
||||
<Import />
|
||||
</Row>
|
||||
<Row>
|
||||
<GIF />
|
||||
</Row>
|
||||
<Row>
|
||||
<Base64 />
|
||||
</Row>
|
||||
<PhotoExample />
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
row: {
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
marginBottom: 20,
|
||||
},
|
||||
container: {
|
||||
backgroundColor: '#eee',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
paddingTop: 10,
|
||||
paddingBottom: 10,
|
||||
},
|
||||
imageSquare: {
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
marginTop: 10,
|
||||
width: 100,
|
||||
flex: 0,
|
||||
},
|
||||
plus: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
position: 'absolute',
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(LocalImagesExample)
|
96
react-native-fast-image-example/src/PreloadExample.js
vendored
Normal file
96
react-native-fast-image-example/src/PreloadExample.js
vendored
Normal file
@ -0,0 +1,96 @@
|
||||
import React, { Component } from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
import uuid from 'uuid/v4'
|
||||
import Button from './Button'
|
||||
import { createImageProgress } from 'react-native-image-progress'
|
||||
|
||||
const IMAGE_URL =
|
||||
'https://cdn-images-1.medium.com/max/1600/1*-CY5bU4OqiJRox7G00sftw.gif'
|
||||
|
||||
const Image = createImageProgress(FastImage)
|
||||
|
||||
class PreloadExample extends Component {
|
||||
state = {
|
||||
show: false,
|
||||
url: IMAGE_URL,
|
||||
}
|
||||
|
||||
bustCache = () => {
|
||||
const key = uuid()
|
||||
const bust = `?bust=${key}`
|
||||
// Preload images. This can be called anywhere.
|
||||
const url = IMAGE_URL + bust
|
||||
this.setState({
|
||||
url,
|
||||
show: false,
|
||||
})
|
||||
}
|
||||
|
||||
preload = () => {
|
||||
FastImage.preload([{ uri: this.state.url }])
|
||||
}
|
||||
|
||||
showImage = () => {
|
||||
this.setState({ show: true })
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Preloading." />
|
||||
<FeatureText text="• Progress indication using react-native-image-progress." />
|
||||
</Section>
|
||||
<SectionFlex
|
||||
style={styles.section}
|
||||
onPress={this.props.onPressReload}
|
||||
>
|
||||
{this.state.show ? (
|
||||
<Image
|
||||
style={styles.image}
|
||||
source={{ uri: this.state.url }}
|
||||
/>
|
||||
) : (
|
||||
<View style={styles.image} />
|
||||
)}
|
||||
<View style={styles.buttons}>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Button text="Bust" onPress={this.bustCache} />
|
||||
</View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Button text="Preload" onPress={this.preload} />
|
||||
</View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Button text="Render" onPress={this.showImage} />
|
||||
</View>
|
||||
</View>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
section: {
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
},
|
||||
buttons: {
|
||||
flexDirection: 'row',
|
||||
marginHorizontal: 20,
|
||||
marginBottom: 10,
|
||||
},
|
||||
image: {
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
marginBottom: 10,
|
||||
height: 100,
|
||||
width: 100,
|
||||
},
|
||||
})
|
||||
|
||||
export default PreloadExample
|
60
react-native-fast-image-example/src/PriorityExample.js
vendored
Normal file
60
react-native-fast-image-example/src/PriorityExample.js
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
import React from 'react'
|
||||
import { PixelRatio, StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const getImageUrl = (id, width, height) =>
|
||||
`https://source.unsplash.com/${id}/${width}x${height}`
|
||||
const IMAGE_SIZE = 1024
|
||||
const IMAGE_SIZE_PX = PixelRatio.getPixelSizeForLayoutSize(IMAGE_SIZE)
|
||||
const IMAGE_URLS = [
|
||||
getImageUrl('x58soEovG_M', IMAGE_SIZE_PX, IMAGE_SIZE_PX),
|
||||
getImageUrl('yPI7myL5eWY', IMAGE_SIZE_PX, IMAGE_SIZE_PX),
|
||||
getImageUrl('S7VCcp6KCKE', IMAGE_SIZE, IMAGE_SIZE),
|
||||
]
|
||||
|
||||
const PriorityExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Prioritize images (low, normal, high)." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URLS[0] + bust,
|
||||
priority: FastImage.priority.low,
|
||||
}}
|
||||
/>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URLS[1] + bust,
|
||||
priority: FastImage.priority.normal,
|
||||
}}
|
||||
/>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URLS[2] + bust,
|
||||
priority: FastImage.priority.high,
|
||||
}}
|
||||
/>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
flex: 1,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 10,
|
||||
marginVertical: 20,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(PriorityExample)
|
81
react-native-fast-image-example/src/ProgressExample.js
vendored
Normal file
81
react-native-fast-image-example/src/ProgressExample.js
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
import React, { Component } from 'react'
|
||||
import { StyleSheet, View, Text } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const IMAGE_URL = 'https://media.giphy.com/media/GEsoqZDGVoisw/giphy.gif'
|
||||
|
||||
class ProgressExample extends Component {
|
||||
state = {
|
||||
mount: new Date(),
|
||||
start: undefined,
|
||||
progress: undefined,
|
||||
end: undefined,
|
||||
}
|
||||
|
||||
render() {
|
||||
const { onPressReload, bust } = this.props
|
||||
const { mount, start, progress, end } = this.state
|
||||
return (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Progress callbacks." />
|
||||
</Section>
|
||||
<SectionFlex
|
||||
onPress={onPressReload}
|
||||
style={{
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
paddingBottom: 20,
|
||||
}}
|
||||
>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URL + bust,
|
||||
}}
|
||||
onLoadStart={() => this.setState({ start: Date.now() })}
|
||||
onProgress={e =>
|
||||
this.setState({
|
||||
progress: Math.round(
|
||||
100 *
|
||||
(e.nativeEvent.loaded /
|
||||
e.nativeEvent.total),
|
||||
),
|
||||
})
|
||||
}
|
||||
onLoad={() => this.setState({ end: Date.now() })}
|
||||
onLoadEnd={() => {}}
|
||||
/>
|
||||
<Text>
|
||||
onLoadStart
|
||||
{start !== undefined && ` - ${start - mount} ms`}
|
||||
</Text>
|
||||
<Text>
|
||||
onProgress
|
||||
{progress !== undefined && ` - ${progress} %`}
|
||||
</Text>
|
||||
<Text>
|
||||
onLoad
|
||||
{end !== undefined && ` - ${end - mount} ms`}
|
||||
</Text>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
width: 100,
|
||||
flex: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(ProgressExample)
|
73
react-native-fast-image-example/src/ResizeModeExample.js
vendored
Normal file
73
react-native-fast-image-example/src/ResizeModeExample.js
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View, Text } from 'react-native'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
import BulletText from './BulletText'
|
||||
|
||||
const IMAGE_URL = 'https://media.giphy.com/media/GEsoqZDGVoisw/giphy.gif'
|
||||
|
||||
const Col = p => <View style={styles.col} {...p} />
|
||||
|
||||
const ResizeModeExample = () => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• resizeMode." />
|
||||
</Section>
|
||||
<SectionFlex style={styles.container}>
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.contain}
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<BulletText>contain</BulletText>
|
||||
</Col>
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.center}
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<BulletText>center</BulletText>
|
||||
</Col>
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.stretch}
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<BulletText>stretch</BulletText>
|
||||
</Col>
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.cover}
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<BulletText>cover</BulletText>
|
||||
</Col>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
height: 100,
|
||||
width: 50,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
marginTop: 0,
|
||||
marginBottom: 10,
|
||||
flex: 0,
|
||||
},
|
||||
container: {
|
||||
padding: 20,
|
||||
},
|
||||
col: {
|
||||
alignItems: 'center',
|
||||
},
|
||||
})
|
||||
|
||||
export default ResizeModeExample
|
13
react-native-fast-image-example/src/Section.js
vendored
Normal file
13
react-native-fast-image-example/src/Section.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
|
||||
export default ({ children }) => <View style={styles.section}>{children}</View>
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
section: {
|
||||
marginTop: 10,
|
||||
marginBottom: 10,
|
||||
marginLeft: 40,
|
||||
marginRight: 40,
|
||||
},
|
||||
})
|
21
react-native-fast-image-example/src/SectionFlex.js
vendored
Normal file
21
react-native-fast-image-example/src/SectionFlex.js
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, TouchableOpacity, View } from 'react-native'
|
||||
|
||||
export default ({ children, onPress, style }) =>
|
||||
onPress ? (
|
||||
<TouchableOpacity style={[styles.sectionFlex, style]} onPress={onPress}>
|
||||
{children}
|
||||
</TouchableOpacity>
|
||||
) : (
|
||||
<View style={[styles.sectionFlex, style]}>{children}</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
sectionFlex: {
|
||||
backgroundColor: '#eee',
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
marginLeft: -10,
|
||||
marginRight: -10,
|
||||
},
|
||||
})
|
18
react-native-fast-image-example/src/StatusBarUnderlay.js
vendored
Normal file
18
react-native-fast-image-example/src/StatusBarUnderlay.js
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
import React from 'react'
|
||||
import { Platform, StatusBar, StyleSheet, View } from 'react-native'
|
||||
import { getStatusBarHeight } from 'react-native-status-bar-height'
|
||||
|
||||
export const STATUS_BAR_HEIGHT = getStatusBarHeight()
|
||||
|
||||
export default () => <View style={styles.statusBarUnderlay} />
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
statusBarUnderlay: {
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: STATUS_BAR_HEIGHT,
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
})
|
BIN
react-native-fast-image-example/src/images/fields.jpg
Normal file
BIN
react-native-fast-image-example/src/images/fields.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
7
react-native-fast-image-example/src/images/fields.js
vendored
Normal file
7
react-native-fast-image-example/src/images/fields.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
react-native-fast-image-example/src/images/jellyfish.gif
Normal file
BIN
react-native-fast-image-example/src/images/jellyfish.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 104 KiB |
25
react-native-fast-image-example/src/index.js
vendored
Normal file
25
react-native-fast-image-example/src/index.js
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
import React from 'react'
|
||||
import { YellowBox } from 'react-native'
|
||||
import { createBottomTabNavigator } from 'react-navigation'
|
||||
import FastImageExamples from './FastImageExamples'
|
||||
import FastImageGrid from './FastImageGrid'
|
||||
import DefaultImageGrid from './DefaultImageGrid'
|
||||
|
||||
YellowBox.ignoreWarnings([
|
||||
'Warning: isMounted(...) is deprecated',
|
||||
'Module RCTImageLoader',
|
||||
])
|
||||
|
||||
const App = createBottomTabNavigator({
|
||||
fastImageExample: {
|
||||
screen: FastImageExamples,
|
||||
},
|
||||
image: {
|
||||
screen: DefaultImageGrid,
|
||||
},
|
||||
fastImage: {
|
||||
screen: FastImageGrid,
|
||||
},
|
||||
})
|
||||
|
||||
export default App
|
28
react-native-fast-image-example/src/withCacheBust.js
vendored
Normal file
28
react-native-fast-image-example/src/withCacheBust.js
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
import React, { Component } from 'react'
|
||||
import uuid from 'uuid/v4'
|
||||
|
||||
export default BaseComponent => {
|
||||
class WithCacheBust extends Component {
|
||||
state = { bust: '?bust' }
|
||||
|
||||
onPressReload = () => {
|
||||
// Force complete re-render and bust image cache.
|
||||
const key = uuid()
|
||||
const bust = `?bust=${key}`
|
||||
this.setState({ bust })
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<BaseComponent
|
||||
bust={this.state.bust}
|
||||
onPressReload={this.onPressReload}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
WithCacheBust.displayName = `withCacheBust${BaseComponent.displayName}`
|
||||
|
||||
return WithCacheBust
|
||||
}
|
@ -1378,6 +1378,10 @@ ci-info@^1.5.0:
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497"
|
||||
|
||||
clamp@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/clamp/-/clamp-1.0.1.tgz#66a0e64011816e37196828fdc8c8c147312c8634"
|
||||
|
||||
class-utils@^0.3.5:
|
||||
version "0.3.6"
|
||||
resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
|
||||
@ -1548,7 +1552,7 @@ cosmiconfig@^5.0.5:
|
||||
js-yaml "^3.9.0"
|
||||
parse-json "^4.0.0"
|
||||
|
||||
create-react-class@^15.6.3:
|
||||
create-react-class@^15.5.2, create-react-class@^15.6.3:
|
||||
version "15.6.3"
|
||||
resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.3.tgz#2d73237fb3f970ae6ebe011a9e66f46dbca80036"
|
||||
dependencies:
|
||||
@ -1556,6 +1560,13 @@ create-react-class@^15.6.3:
|
||||
loose-envify "^1.3.1"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
create-react-context@0.2.2:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca"
|
||||
dependencies:
|
||||
fbjs "^0.8.0"
|
||||
gud "^1.0.0"
|
||||
|
||||
cross-spawn@^5.0.1, cross-spawn@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
|
||||
@ -1954,7 +1965,7 @@ fbjs-scripts@^0.8.1:
|
||||
semver "^5.1.0"
|
||||
through2 "^2.0.0"
|
||||
|
||||
fbjs@0.8.17, fbjs@^0.8.9:
|
||||
fbjs@0.8.17, fbjs@^0.8.0, fbjs@^0.8.9:
|
||||
version "0.8.17"
|
||||
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd"
|
||||
dependencies:
|
||||
@ -2184,6 +2195,10 @@ growly@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
|
||||
|
||||
gud@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0"
|
||||
|
||||
handlebars@^4.0.3:
|
||||
version "4.0.12"
|
||||
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5"
|
||||
@ -2260,6 +2275,10 @@ has@^1.0.1:
|
||||
dependencies:
|
||||
function-bind "^1.1.1"
|
||||
|
||||
hoist-non-react-statics@^2.2.0, hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0:
|
||||
version "2.5.5"
|
||||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47"
|
||||
|
||||
home-or-tmp@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
|
||||
@ -2559,6 +2578,10 @@ is-windows@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
|
||||
|
||||
isarray@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
|
||||
|
||||
isarray@1.0.0, isarray@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||
@ -3162,7 +3185,7 @@ lodash.throttle@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
|
||||
|
||||
lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1:
|
||||
lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1:
|
||||
version "4.17.11"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
|
||||
|
||||
@ -3868,6 +3891,12 @@ path-parse@^1.0.5:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
|
||||
|
||||
path-to-regexp@^1.7.0:
|
||||
version "1.7.0"
|
||||
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d"
|
||||
dependencies:
|
||||
isarray "0.0.1"
|
||||
|
||||
path-type@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
|
||||
@ -3998,7 +4027,7 @@ prompts@^0.1.9:
|
||||
kleur "^2.0.1"
|
||||
sisteransi "^0.1.1"
|
||||
|
||||
prop-types@^15.5.8, prop-types@^15.6.2:
|
||||
prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2:
|
||||
version "15.6.2"
|
||||
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102"
|
||||
dependencies:
|
||||
@ -4025,6 +4054,13 @@ qs@~6.5.2:
|
||||
version "6.5.2"
|
||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
|
||||
|
||||
query-string@^6.1.0:
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.1.0.tgz#01e7d69f6a0940dac67a937d6c6325647aa4532a"
|
||||
dependencies:
|
||||
decode-uri-component "^0.2.0"
|
||||
strict-uri-encode "^2.0.0"
|
||||
|
||||
randomatic@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.0.tgz#36f2ca708e9e567f5ed2ec01949026d50aa10116"
|
||||
@ -4065,6 +4101,74 @@ react-is@^16.5.0:
|
||||
version "16.5.2"
|
||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.5.2.tgz#e2a7b7c3f5d48062eb769fcb123505eb928722e3"
|
||||
|
||||
react-lifecycles-compat@^3, react-lifecycles-compat@^3.0.4:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
|
||||
|
||||
react-native-dismiss-keyboard@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-dismiss-keyboard/-/react-native-dismiss-keyboard-1.0.0.tgz#32886242b3f2317e121f3aeb9b0a585e2b879b49"
|
||||
|
||||
react-native-drawer-layout-polyfill@^1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native-drawer-layout-polyfill/-/react-native-drawer-layout-polyfill-1.3.2.tgz#192c84d7a5a6b8a6d2be2c7daa5e4164518d0cc7"
|
||||
dependencies:
|
||||
react-native-drawer-layout "1.3.2"
|
||||
|
||||
react-native-drawer-layout@1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native-drawer-layout/-/react-native-drawer-layout-1.3.2.tgz#b9740d7663a1dc4f88a61b9c6d93d2d948ea426e"
|
||||
dependencies:
|
||||
react-native-dismiss-keyboard "1.0.0"
|
||||
|
||||
react-native-fast-image@^5.0.9:
|
||||
version "5.0.9"
|
||||
resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-5.0.9.tgz#31dbe2cff430306e0bd2e23d0610df297cb0eae9"
|
||||
|
||||
react-native-image-picker@^0.26.10:
|
||||
version "0.26.10"
|
||||
resolved "https://registry.yarnpkg.com/react-native-image-picker/-/react-native-image-picker-0.26.10.tgz#0bb9ab928984948c67aee0b9e64216bee007a9fc"
|
||||
|
||||
react-native-image-progress@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-image-progress/-/react-native-image-progress-1.1.1.tgz#95bbe0875c7ebd54286df69cb37b598b94c54eb0"
|
||||
dependencies:
|
||||
prop-types "^15.5.10"
|
||||
|
||||
react-native-safe-area-view@0.11.0:
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.11.0.tgz#4f3dda43c2bace37965e7c6aef5fc83d4f19d174"
|
||||
dependencies:
|
||||
hoist-non-react-statics "^2.3.1"
|
||||
|
||||
react-native-screens@^1.0.0-alpha.11:
|
||||
version "1.0.0-alpha.12"
|
||||
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.12.tgz#5953c39c9dbfbe324610005e07d85a416081c48c"
|
||||
|
||||
react-native-status-bar-height@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-status-bar-height/-/react-native-status-bar-height-2.1.0.tgz#cb70fcdbb8dfdf0b9140d77625d27e4ea32fd7f4"
|
||||
|
||||
react-native-tab-view@^0.0.77:
|
||||
version "0.0.77"
|
||||
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.77.tgz#11ceb8e7c23100d07e628dc151b57797524d00d4"
|
||||
dependencies:
|
||||
prop-types "^15.6.0"
|
||||
|
||||
react-native-tab-view@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.0.2.tgz#66e0bc6d38a227ed2b212e3a256b7902f6ce02ed"
|
||||
dependencies:
|
||||
prop-types "^15.6.1"
|
||||
|
||||
react-native-vector-icons@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-5.0.0.tgz#d0bd6fdda01159db409810718dd04904951a98f5"
|
||||
dependencies:
|
||||
lodash "^4.0.0"
|
||||
prop-types "^15.5.10"
|
||||
yargs "^8.0.2"
|
||||
|
||||
react-native@0.57.1:
|
||||
version "0.57.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.57.1.tgz#a8bffeac13e200b95bbebd11f7131570902e1e74"
|
||||
@ -4121,6 +4225,48 @@ react-native@0.57.1:
|
||||
xmldoc "^0.4.0"
|
||||
yargs "^9.0.0"
|
||||
|
||||
react-navigation-deprecated-tab-navigator@1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-deprecated-tab-navigator/-/react-navigation-deprecated-tab-navigator-1.3.0.tgz#015dcae1e977b984ca7e99245261c15439026bb7"
|
||||
dependencies:
|
||||
react-native-tab-view "^0.0.77"
|
||||
|
||||
react-navigation-drawer@0.5.0:
|
||||
version "0.5.0"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.5.0.tgz#d91b6a6ec65c34ba78c00f814b1e6508922cc9ec"
|
||||
dependencies:
|
||||
react-native-drawer-layout-polyfill "^1.3.2"
|
||||
|
||||
react-navigation-stack@0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-0.6.0.tgz#57dd25d0902137b950795549c43f3608e9edc250"
|
||||
|
||||
react-navigation-tabs@0.8.2:
|
||||
version "0.8.2"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.8.2.tgz#65f8a6ce368684227603345b4d312da2ef3366e1"
|
||||
dependencies:
|
||||
hoist-non-react-statics "^2.5.0"
|
||||
prop-types "^15.6.1"
|
||||
react-lifecycles-compat "^3.0.4"
|
||||
react-native-tab-view "^1.0.0"
|
||||
|
||||
react-navigation@^2.16.0:
|
||||
version "2.16.0"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.16.0.tgz#9b9320801700baac50e49e87a63641a4df179230"
|
||||
dependencies:
|
||||
clamp "^1.0.1"
|
||||
create-react-context "0.2.2"
|
||||
hoist-non-react-statics "^2.2.0"
|
||||
path-to-regexp "^1.7.0"
|
||||
query-string "^6.1.0"
|
||||
react-lifecycles-compat "^3"
|
||||
react-native-safe-area-view "0.11.0"
|
||||
react-native-screens "^1.0.0-alpha.11"
|
||||
react-navigation-deprecated-tab-navigator "1.3.0"
|
||||
react-navigation-drawer "0.5.0"
|
||||
react-navigation-stack "0.6.0"
|
||||
react-navigation-tabs "0.8.2"
|
||||
|
||||
react-proxy@^1.1.7:
|
||||
version "1.1.8"
|
||||
resolved "https://registry.yarnpkg.com/react-proxy/-/react-proxy-1.1.8.tgz#9dbfd9d927528c3aa9f444e4558c37830ab8c26a"
|
||||
@ -4137,6 +4283,14 @@ react-test-renderer@16.5.0:
|
||||
react-is "^16.5.0"
|
||||
schedule "^0.3.0"
|
||||
|
||||
react-timeout@^1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/react-timeout/-/react-timeout-1.1.2.tgz#df6da252abf16d5542abdf12e14999930c7cde9f"
|
||||
dependencies:
|
||||
create-react-class "^15.5.2"
|
||||
hoist-non-react-statics "^2.3.1"
|
||||
object-assign "^4.0.1"
|
||||
|
||||
react-timer-mixin@^0.13.2:
|
||||
version "0.13.4"
|
||||
resolved "https://registry.yarnpkg.com/react-timer-mixin/-/react-timer-mixin-0.13.4.tgz#75a00c3c94c13abe29b43d63b4c65a88fc8264d3"
|
||||
@ -4688,6 +4842,10 @@ stream-buffers@~2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4"
|
||||
|
||||
strict-uri-encode@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
|
||||
|
||||
string-length@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed"
|
||||
@ -5210,6 +5368,24 @@ yargs@^11.0.0:
|
||||
y18n "^3.2.1"
|
||||
yargs-parser "^9.0.2"
|
||||
|
||||
yargs@^8.0.2:
|
||||
version "8.0.2"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360"
|
||||
dependencies:
|
||||
camelcase "^4.1.0"
|
||||
cliui "^3.2.0"
|
||||
decamelize "^1.1.1"
|
||||
get-caller-file "^1.0.1"
|
||||
os-locale "^2.0.0"
|
||||
read-pkg-up "^2.0.0"
|
||||
require-directory "^2.1.1"
|
||||
require-main-filename "^1.0.1"
|
||||
set-blocking "^2.0.0"
|
||||
string-width "^2.0.0"
|
||||
which-module "^2.0.0"
|
||||
y18n "^3.2.1"
|
||||
yargs-parser "^7.0.0"
|
||||
|
||||
yargs@^9.0.0:
|
||||
version "9.0.1"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c"
|
||||
|
Loading…
x
Reference in New Issue
Block a user