Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2462553

Browse files
committed
Update the Horizontal example
1 parent f2b1440 commit 2462553

File tree

11 files changed

+556
-963
lines changed

11 files changed

+556
-963
lines changed

‎examples/Horizontal/.babelrc‎

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

‎examples/Horizontal/.flowconfig‎

Lines changed: 0 additions & 46 deletions
This file was deleted.

‎examples/Horizontal/android/app/BUCK‎

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import re
2-
31
# To learn about Buck see [Docs](https://buckbuild.com/).
42
# To run your application with Buck:
53
# - install Buck
@@ -11,56 +9,57 @@ import re
119
#
1210

1311
lib_deps = []
12+
1413
for jarfile in glob(['libs/*.jar']):
15-
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'1円', jarfile)
14+
name = 'jars__' + jarfile[jarfile.rindex('/') +1: jarfile.rindex('.jar')]
1615
lib_deps.append(':' + name)
1716
prebuilt_jar(
1817
name = name,
1918
binary_jar = jarfile,
2019
)
2120

2221
for aarfile in glob(['libs/*.aar']):
23-
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'1円', aarfile)
22+
name = 'aars__' + aarfile[aarfile.rindex('/') +1: aarfile.rindex('.aar')]
2423
lib_deps.append(':' + name)
2524
android_prebuilt_aar(
2625
name = name,
2726
aar = aarfile,
2827
)
2928

3029
android_library(
31-
name = 'all-libs',
32-
exported_deps = lib_deps
30+
name = "all-libs",
31+
exported_deps = lib_deps,
3332
)
3433

3534
android_library(
36-
name = 'app-code',
37-
srcs = glob([
38-
'src/main/java/**/*.java',
39-
]),
40-
deps = [
41-
':all-libs',
42-
':build_config',
43-
':res',
44-
],
35+
name = "app-code",
36+
srcs = glob([
37+
"src/main/java/**/*.java",
38+
]),
39+
deps = [
40+
":all-libs",
41+
":build_config",
42+
":res",
43+
],
4544
)
4645

4746
android_build_config(
48-
name = 'build_config',
49-
package = 'com.horizontal',
47+
name = "build_config",
48+
package = "com.horizontal",
5049
)
5150

5251
android_resource(
53-
name = 'res',
54-
res='src/main/res',
55-
package='com.horizontal',
52+
name = "res",
53+
package="com.horizontal",
54+
res="src/main/res",
5655
)
5756

5857
android_binary(
59-
name = 'app',
60-
package_type='debug',
61-
manifest = 'src/main/AndroidManifest.xml',
62-
keystore='//android/keystores:debug',
63-
deps = [
64-
':app-code',
65-
],
58+
name = "app",
59+
keystore="//android/keystores:debug",
60+
manifest = "src/main/AndroidManifest.xml",
61+
package_type="debug",
62+
deps = [
63+
":app-code",
64+
],
6665
)

‎examples/Horizontal/android/app/build.gradle‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ import com.android.build.OutputFile
3333
* // bundleInPaidRelease: true,
3434
* // bundleInBeta: true,
3535
*
36+
* // whether to disable dev mode in custom build variants (by default only disabled in release)
37+
* // for example: to disable dev mode in the staging build type (if configured)
38+
* devDisabledInStaging: true,
39+
* // The configuration property can be in the following formats
40+
* // 'devDisabledIn${productFlavor}${buildType}'
41+
* // 'devDisabledIn${buildType}'
42+
*
3643
* // the root of your project, i.e. where "package.json" lives
3744
* root: "../../",
3845
*
@@ -58,7 +65,7 @@ import com.android.build.OutputFile
5865
* inputExcludes: ["android/**", "ios/**"],
5966
*
6067
* // override which node gets called and with what additional arguments
61-
* nodeExecutableAndArgs: ["node"]
68+
* nodeExecutableAndArgs: ["node"],
6269
*
6370
* // supply additional arguments to the packager
6471
* extraPackagerArgs: []

‎examples/Horizontal/android/app/proguard-rules.pro‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050

5151
-dontwarn com.facebook.react.**
5252

53+
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
54+
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
55+
-dontwarn android.text.StaticLayout
56+
5357
# okhttp
5458

5559
-keepattributes Signature
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
keystore(
2-
name = 'debug',
3-
store='debug.keystore',
4-
properties='debug.keystore.properties',
5-
visibility = [
6-
'PUBLIC',
7-
],
2+
name = "debug",
3+
properties="debug.keystore.properties",
4+
store="debug.keystore",
5+
visibility = [
6+
"PUBLIC",
7+
],
88
)

‎examples/Horizontal/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const data = {
6464
},
6565
};
6666

67-
class Basic extends Component {
67+
class Horizontal extends Component {
6868
render() {
6969
return (
7070
<View style={styles.container}>
@@ -223,4 +223,4 @@ const styles = StyleSheet.create({
223223
},
224224
});
225225

226-
AppRegistry.registerComponent('Horizontal', () => Basic);
226+
AppRegistry.registerComponent('Horizontal', () => Horizontal);

‎examples/Horizontal/ios/Horizontal.xcodeproj/project.pbxproj‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@
874874
);
875875
runOnlyForDeploymentPostprocessing = 0;
876876
shellPath = /bin/sh;
877-
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
877+
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
878878
};
879879
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
880880
isa = PBXShellScriptBuildPhase;
@@ -888,7 +888,7 @@
888888
);
889889
runOnlyForDeploymentPostprocessing = 0;
890890
shellPath = /bin/sh;
891-
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
891+
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
892892
};
893893
/* End PBXShellScriptBuildPhase section */
894894

‎examples/Horizontal/ios/HorizontalTests/HorizontalTests.m‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
3737

3838
- (void)testRendersWelcomeScreen
3939
{
40-
UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
40+
UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
4141
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
4242
BOOL foundElement = NO;
4343

‎examples/Horizontal/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"start": "node node_modules/react-native/local-cli/cli.js start"
77
},
88
"dependencies": {
9-
"react": "^15.4.0",
10-
"react-native": "^0.42.3",
9+
"react": "16.0.0-alpha.12",
10+
"react-native": "0.46.3",
1111
"react-native-sortable-list": "file:../.."
1212
}
13-
}
13+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /