Skip to content

Commit 38c7982

Browse files
committed
Merge branch 'release/0.12.0'
2 parents 1726cc2 + 13a853a commit 38c7982

File tree

27 files changed

+915
-157
lines changed

27 files changed

+915
-157
lines changed

components/DropDownMenu.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, {
22
Component,
33
} from 'react';
4-
import { Modal, ListView, } from 'react-native';
4+
import { Modal, ListView, Animated } from 'react-native';
55
import _ from 'lodash';
66

77
import { Button } from './Button';
@@ -20,6 +20,8 @@ import {
2020
ZoomOut,
2121
} from '@shoutem/animation';
2222

23+
const AnimatedListView = Animated.createAnimatedComponent(ListView);
24+
2325
class DropDownMenu extends Component {
2426
static propTypes = {
2527
/**
@@ -70,8 +72,8 @@ class DropDownMenu extends Component {
7072
}
7173

7274
componentWillMount() {
73-
this.scrollDriver = new ScrollDriver();
74-
this.timingDriver = new TimingDriver();
75+
this.scrollDriver = new ScrollDriver({ useNativeDriver: true });
76+
this.timingDriver = new TimingDriver({ useNativeDriver: true });
7577
}
7678

7779
getVisibleOptions() {
@@ -204,7 +206,7 @@ class DropDownMenu extends Component {
204206
<ZoomOut driver={this.timingDriver} maxFactor={1.1} style={{ flex: 1 }}>
205207
<FadeIn driver={this.timingDriver} style={{ flex: 1 }}>
206208
<View style={style.modal} styleName="vertical">
207-
<ListView
209+
<AnimatedListView
208210
dataSource={dataSource}
209211
renderRow={this.renderRow}
210212
style={listViewStyle}

components/ScrollView/ScrollDriverProvider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class ScrollDriverProvider extends Component {
4444
} else if (context.driverProvider) {
4545
this.animationDriver = context.animationDriver;
4646
} else if (!this.animationDriver) {
47-
this.animationDriver = new ScrollDriver();
47+
this.animationDriver = new ScrollDriver({ useNativeDriver: true });
4848
}
4949
}
5050

components/ScrollView/ScrollView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ScrollView extends Component {
2424

2525
constructor(props, context) {
2626
super(props, context);
27-
this.animationDriver = props.driver || new ScrollDriver();
27+
this.animationDriver = props.driver || new ScrollDriver({ useNativeDriver: true });
2828
}
2929

3030
getChildContext() {

examples/RestaurantsApp/.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["react-native"]
3+
}

examples/RestaurantsApp/.flowconfig

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
[ignore]
2-
3-
# We fork some components by platform.
2+
; We fork some components by platform
43
.*/*[.]android.js
54

6-
# Ignore templates with `@flow` in header
7-
.*/local-cli/generator.*
8-
9-
# Ignore malformed json
10-
.*/node_modules/y18n/test/.*\.json
11-
12-
# Ignore the website subdir
13-
<PROJECT_ROOT>/website/.*
14-
15-
# Ignore BUCK generated dirs
5+
; Ignore "BUCK" generated dirs
166
<PROJECT_ROOT>/\.buckd/
177

18-
# Ignore unexpected extra @providesModule
19-
.*/node_modules/commoner/test/source/widget/share.js
8+
; Ignore unexpected extra "@providesModule"
9+
.*/node_modules/.*/node_modules/fbjs/.*
2010

21-
# Ignore duplicate module providers
22-
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
11+
; Ignore duplicate module providers
12+
; For RN Apps installed via npm, "Libraries" folder is inside
13+
; "node_modules/react-native" but in the source repo it is in the root
2314
.*/Libraries/react-native/React.js
2415
.*/Libraries/react-native/ReactNative.js
25-
.*/node_modules/jest-runtime/build/__tests__/.*
2616

2717
[include]
2818

@@ -32,27 +22,25 @@ node_modules/react-native/flow
3222
flow/
3323

3424
[options]
35-
module.system=haste
25+
emoji=true
3626

37-
esproposal.class_static_fields=enable
38-
esproposal.class_instance_fields=enable
27+
module.system=haste
3928

4029
experimental.strict_type_args=true
4130

4231
munge_underscores=true
4332

44-
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
4533
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
4634

4735
suppress_type=$FlowIssue
4836
suppress_type=$FlowFixMe
4937
suppress_type=$FixMe
5038

51-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(30\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
52-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(30\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
39+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-8]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-8]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
5341
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
5442

5543
unsafe.enable_getters_and_setters=true
5644

5745
[version]
58-
^0.30.0
46+
^0.38.0

examples/RestaurantsApp/.gitignore

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,20 @@ local.properties
3434
#
3535
node_modules/
3636
npm-debug.log
37+
yarn-error.log
3738

3839
# BUCK
3940
buck-out/
4041
\.buckd/
41-
android/app/libs
4242
*.keystore
43+
44+
# fastlane
45+
#
46+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47+
# screenshots whenever they are needed.
48+
# For more information about the recommended setup visit:
49+
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
50+
51+
fastlane/report.xml
52+
fastlane/Preview.html
53+
fastlane/screenshots

examples/RestaurantsApp/android/app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ android {
126126
}
127127

128128
dependencies {
129+
compile project(':react-native-photo-view')
129130
compile project(':react-native-share')
131+
compile project(':react-native-linear-gradient')
130132
compile project(':react-native-vector-icons')
131133
compile fileTree(dir: "libs", include: ["*.jar"])
132134
compile "com.android.support:appcompat-v7:23.0.1"

examples/RestaurantsApp/android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
<activity
2020
android:name=".MainActivity"
2121
android:label="@string/app_name"
22-
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
22+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
23+
android:windowSoftInputMode="adjustResize">
2324
<intent-filter>
2425
<action android:name="android.intent.action.MAIN" />
2526
<category android:name="android.intent.category.LAUNCHER" />
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

examples/RestaurantsApp/android/app/src/main/java/com/shoutemrestaurants/MainApplication.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package com.shoutemrestaurants;
22

33
import android.app.Application;
4-
import android.util.Log;
54

65
import com.facebook.react.ReactApplication;
6+
import com.reactnative.photoview.PhotoViewPackage;
77
import cl.json.RNSharePackage;
8+
import com.BV.LinearGradient.LinearGradientPackage;
89
import com.oblador.vectoricons.VectorIconsPackage;
9-
import com.facebook.react.ReactInstanceManager;
1010
import com.facebook.react.ReactNativeHost;
1111
import com.facebook.react.ReactPackage;
1212
import com.facebook.react.shell.MainReactPackage;
@@ -19,15 +19,17 @@ public class MainApplication extends Application implements ReactApplication {
1919

2020
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
2121
@Override
22-
protected boolean getUseDeveloperSupport() {
22+
public boolean getUseDeveloperSupport() {
2323
return BuildConfig.DEBUG;
2424
}
2525

2626
@Override
2727
protected List<ReactPackage> getPackages() {
2828
return Arrays.<ReactPackage>asList(
2929
new MainReactPackage(),
30+
new PhotoViewPackage(),
3031
new RNSharePackage(),
32+
new LinearGradientPackage(),
3133
new VectorIconsPackage()
3234
);
3335
}

examples/RestaurantsApp/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:1.3.1'
8+
classpath 'com.android.tools.build:gradle:2.2.3'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files

examples/RestaurantsApp/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

examples/RestaurantsApp/android/settings.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
rootProject.name = 'ShoutemRestaurants'
2+
include ':react-native-photo-view'
3+
project(':react-native-photo-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-photo-view/android')
24
include ':react-native-share'
35
project(':react-native-share').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share/android')
6+
include ':react-native-linear-gradient'
7+
project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android')
48
include ':react-native-vector-icons'
59
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
610

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>APPL</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>1</string>
23+
<key>LSRequiresIPhoneOS</key>
24+
<true/>
25+
<key>UILaunchStoryboardName</key>
26+
<string>LaunchScreen</string>
27+
<key>UIRequiredDeviceCapabilities</key>
28+
<array>
29+
<string>armv7</string>
30+
</array>
31+
<key>UISupportedInterfaceOrientations</key>
32+
<array>
33+
<string>UIInterfaceOrientationPortrait</string>
34+
<string>UIInterfaceOrientationLandscapeLeft</string>
35+
<string>UIInterfaceOrientationLandscapeRight</string>
36+
</array>
37+
<key>UIViewControllerBasedStatusBarAppearance</key>
38+
<false/>
39+
<key>NSLocationWhenInUseUsageDescription</key>
40+
<string></string>
41+
<key>NSAppTransportSecurity</key>
42+
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
43+
<dict>
44+
<key>NSExceptionDomains</key>
45+
<dict>
46+
<key>localhost</key>
47+
<dict>
48+
<key>NSExceptionAllowsInsecureHTTPLoads</key>
49+
<true/>
50+
</dict>
51+
</dict>
52+
</dict>
53+
</dict>
54+
</plist>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>BNDL</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>1</string>
23+
</dict>
24+
</plist>

0 commit comments

Comments
 (0)