-
Notifications
You must be signed in to change notification settings - Fork 61
/
index.android.js
54 lines (49 loc) · 1.17 KB
/
index.android.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* React Native Easy Gestures Example
* https://github.com/keske/react-native-easy-gestures
*
* @flow
*/
import React, { Component } from 'react';
import { AppRegistry, Image, View } from 'react-native';
// Component
import Gestures from './lib/';
// Photo
const photo = require('./static/photo.jpg');
export default class GesturesExample extends Component {
render() {
return (
<View
style={{
flex: 1,
justifyContent: 'center',
alignItems: 'center',
}}
>
<Gestures
onStart={(event, styles) => {
console.log('Start');
console.log(styles);
}}
onChange={(event, styles) => {
console.log('Change');
console.log(styles);
}}
onRelease={(event, styles) => {
console.log('Release');
console.log(styles);
}}
>
<Image
source={photo}
style={{
width: 300,
height: 400,
}}
/>
</Gestures>
</View>
);
}
}
AppRegistry.registerComponent('GesturesExample', () => GesturesExample);