Skip to content

Commit

Permalink
Update example dependencies and illustrate issue from #46
Browse files Browse the repository at this point in the history
  • Loading branch information
mehcode committed Aug 9, 2017
1 parent 11d4ed9 commit 7433240
Show file tree
Hide file tree
Showing 8 changed files with 5,486 additions and 19 deletions.
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def enableProguardInReleaseBuilds = false

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
buildToolsVersion '25.0.0'

defaultConfig {
applicationId "com.example"
Expand Down
1 change: 1 addition & 0 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:windowSoftInputMode="stateVisible|adjustResize"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class MainApplication extends Application implements ReactApplication {

private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
protected boolean getUseDeveloperSupport() {
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}

Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jan 20 16:10:09 PST 2017
#Wed Aug 09 12:02:05 PDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
35 changes: 24 additions & 11 deletions example/index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import React, {Component} from "react";
import {
StyleSheet,
Text,
View,
} from "react-native";
import React, { Component } from "react";
import { StyleSheet, Text, View, TextInput } from "react-native";
import SplashScreen from "rn-splash-screen";

export default class Example extends Component {
state = {
isLoading: true,
isLoading: true
};

componentDidMount() {
global.setTimeout(() => {
this.setState({isLoading: false});
this.setState({ isLoading: false });
}, 1000);
}

Expand All @@ -24,14 +20,23 @@ export default class Example extends Component {
}
}

handlePress = () => {
this.refs.input.blur();
};

render() {
if (this.state.isLoading) return null;

return (
<View style={styles.container}>
<Text style={styles.welcome}>
<Text style={styles.welcome} onPress={this.handlePress}>
Welcome to React Native!
</Text>
<TextInput
ref="input"
style={styles.input}
underlineColorAndroid="rgba(255, 255, 255, 0.5)"
/>
</View>
);
}
Expand All @@ -40,12 +45,20 @@ export default class Example extends Component {
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#252525",
justifyContent: "center",
alignItems: "center",
alignItems: "center"
},
welcome: {
color: "#fff",
fontSize: 20,
textAlign: "center",
margin: 10,
margin: 10
},
input: {
marginBottom: 40,
color: "#fff",
marginHorizontal: 30,
alignSelf: "stretch"
}
});
Loading

0 comments on commit 7433240

Please # to comment.