-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Project is buildable again, version 1.5.0
- Loading branch information
Showing
24 changed files
with
298 additions
and
3,105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'react-native'; | ||
import React from 'react'; | ||
import Index from '../index.android.js'; | ||
|
||
// Note: test renderer must be required after react-native. | ||
import renderer from 'react-test-renderer'; | ||
|
||
it('renders correctly', () => { | ||
const tree = renderer.create( | ||
<Index /> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'react-native'; | ||
import React from 'react'; | ||
import Index from '../index.ios.js'; | ||
|
||
// Note: test renderer must be required after react-native. | ||
import renderer from 'react-test-renderer'; | ||
|
||
it('renders correctly', () => { | ||
const tree = renderer.create( | ||
<Index /> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
example/android/app/src/main/java/com/example/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<resources> | ||
|
||
<string name="app_name">example</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Thu Jul 20 18:01:37 CST 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
rootProject.name = 'example' | ||
include ':react-native-photo-view' | ||
project(':react-native-photo-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-photo-view/android') | ||
|
||
include ':app' | ||
include ':react-native-photo-view' | ||
project(':react-native-photo-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-photo-view/android') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
import React, {Component} from 'react'; | ||
import React, { Component } from 'react'; | ||
import { | ||
AppRegistry, | ||
StyleSheet, | ||
View, | ||
AppRegistry, | ||
StyleSheet, | ||
View | ||
} from 'react-native'; | ||
import PhotoView from 'react-native-photo-view'; | ||
|
||
class example extends Component { | ||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<PhotoView | ||
source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}} | ||
onLoad={() => console.log("onLoad called")} | ||
onTap={() => console.log("onTap called")} | ||
minimumZoomScale={0.5} | ||
maximumZoomScale={3} | ||
androidScaleType="center" | ||
style={styles.photo} /> | ||
</View> | ||
); | ||
} | ||
export default class Example extends Component { | ||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<PhotoView | ||
source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}} | ||
onLoad={() => console.log("onLoad called")} | ||
onTap={() => console.log("onTap called")} | ||
minimumZoomScale={0.5} | ||
maximumZoomScale={3} | ||
androidScaleType="center" | ||
style={styles.photo} /> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
backgroundColor: '#F5FCFF', | ||
}, | ||
photo: { | ||
width: 300, | ||
height: 300, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
backgroundColor: 'black' | ||
}, | ||
text: { | ||
backgroundColor: "transparent", | ||
color: "#FFF", | ||
} | ||
container: { | ||
flex: 1, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
backgroundColor: '#F5FCFF', | ||
}, | ||
photo: { | ||
width: 300, | ||
height: 300, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
backgroundColor: 'black' | ||
}, | ||
text: { | ||
backgroundColor: "transparent", | ||
color: "#FFF", | ||
} | ||
}); | ||
|
||
AppRegistry.registerComponent('example', () => example); | ||
AppRegistry.registerComponent('example', () => Example); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,68 @@ | ||
import React, {Component} from 'react'; | ||
import React, { Component } from 'react'; | ||
import { | ||
AppRegistry, | ||
StyleSheet, | ||
View, | ||
AppRegistry, | ||
StyleSheet, | ||
View | ||
} from 'react-native'; | ||
import PhotoView from 'react-native-photo-view'; | ||
|
||
class example extends Component { | ||
_onScale = (event) => { | ||
console.log('_onScale', event.nativeEvent); | ||
}; | ||
_onTap = (event) => { | ||
console.log('_onTap', event.nativeEvent); | ||
}; | ||
_onViewTap = (event) => { | ||
console.log('_onViewTap', event.nativeEvent); | ||
}; | ||
_onLoadStart = (event) => { | ||
console.log('_onLoadStart', event.nativeEvent); | ||
}; | ||
_onLoad = (event) => { | ||
console.log('_onLoad', event.nativeEvent); | ||
}; | ||
_onLoadEnd = (event) => { | ||
console.log('_onLoadEnd', event.nativeEvent); | ||
}; | ||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<PhotoView | ||
source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}} | ||
onScale={this._onScale} | ||
onTap={this._onTap} | ||
onViewTap={this._onViewTap} | ||
onLoadStart={this._onLoadStart} | ||
onLoad={this._onLoad} | ||
onLoadEnd={this._onLoadEnd} | ||
showsVerticalScrollIndicator={true} | ||
showsHorizontalScrollIndicator={true} | ||
minimumZoomScale={0.5} | ||
maximumZoomScale={3} | ||
style={styles.photo} /> | ||
</View> | ||
); | ||
} | ||
export default class Example extends Component { | ||
_onScale = (event) => { | ||
console.log('_onScale', event.nativeEvent); | ||
}; | ||
_onTap = (event) => { | ||
console.log('_onTap', event.nativeEvent); | ||
}; | ||
_onViewTap = (event) => { | ||
console.log('_onViewTap', event.nativeEvent); | ||
}; | ||
_onLoadStart = (event) => { | ||
console.log('_onLoadStart', event.nativeEvent); | ||
}; | ||
_onLoad = (event) => { | ||
console.log('_onLoad', event.nativeEvent); | ||
}; | ||
_onLoadEnd = (event) => { | ||
console.log('_onLoadEnd', event.nativeEvent); | ||
}; | ||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<PhotoView | ||
source={{uri: "https://facebook.github.io/react/img/logo_og.png"}} | ||
onScale={this._onScale} | ||
onTap={this._onTap} | ||
onViewTap={this._onViewTap} | ||
onLoadStart={this._onLoadStart} | ||
onLoad={this._onLoad} | ||
onLoadEnd={this._onLoadEnd} | ||
showsVerticalScrollIndicator={true} | ||
showsHorizontalScrollIndicator={true} | ||
minimumZoomScale={0.5} | ||
maximumZoomScale={3} | ||
style={styles.photo} /> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
backgroundColor: '#F5FCFF', | ||
}, | ||
photo: { | ||
width: 300, | ||
height: 300, | ||
justifyContent: 'center', | ||
alignItems: 'center' | ||
}, | ||
text: { | ||
backgroundColor: "transparent", | ||
color: "#FFF", | ||
} | ||
container: { | ||
flex: 1, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
backgroundColor: '#F5FCFF', | ||
}, | ||
photo: { | ||
width: 300, | ||
height: 300, | ||
justifyContent: 'center', | ||
alignItems: 'center' | ||
}, | ||
text: { | ||
backgroundColor: "transparent", | ||
color: "#FFF", | ||
} | ||
}); | ||
|
||
AppRegistry.registerComponent('example', () => example); | ||
AppRegistry.registerComponent('example', () => Example); |
Oops, something went wrong.