forked from sunlight3d/ReactNativeTutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e368b0
commit b6a8f32
Showing
25 changed files
with
6,768 additions
and
50 deletions.
There are no files selected for viewing
9 changes: 5 additions & 4 deletions
9
React Native tutorial-7-Layout with Flexbox/code/TutorialProject/.idea/workspace.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
37 changes: 21 additions & 16 deletions
37
React Native tutorial-8-Handling text input/code/TutorialProject/.idea/workspace.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,48 +3,55 @@ Nguyen Duc Hoang - [email protected] | |
React Native tutorial video | ||
*/ | ||
import React from 'react'; | ||
import {AppRegistry, StyleSheet, Text, View, StatusBar} from 'react-native'; | ||
import {AppRegistry, StyleSheet, Text, View, StatusBar, TextInput} from 'react-native'; | ||
|
||
export default class AutoLayoutComponent extends React.Component { | ||
export default class App extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
text: "" | ||
} | ||
} | ||
/* | ||
handleChangeText = (typedText) => { | ||
this.setState({text: typedText}); | ||
} | ||
*/ | ||
render() { | ||
return ( | ||
<View | ||
style={ | ||
{ | ||
flex: 1, | ||
flexDirection: 'column', | ||
justifyContent: 'flex-start', | ||
alignItems: 'flex-end' | ||
} | ||
}> | ||
<StatusBar hidden={true} /> | ||
<View | ||
<View style={ | ||
{ | ||
padding: 10 | ||
} | ||
}> | ||
<TextInput | ||
style={ | ||
{ | ||
width: 60, | ||
height: 60, | ||
backgroundColor: 'red' | ||
height: 50 | ||
} | ||
}/> | ||
<View | ||
style={ | ||
{ | ||
width: 60, | ||
height: 60, | ||
backgroundColor: 'green' | ||
} | ||
placeholder="Type your text here" | ||
onChangeText={ | ||
(typedText) => { | ||
this.setState({text: typedText}); | ||
} | ||
}/> | ||
<View | ||
} | ||
value={this.state.text} | ||
/> | ||
<Text | ||
style={ | ||
{ | ||
width: 60, | ||
height: 60, | ||
backgroundColor: 'blue' | ||
padding: 20, | ||
fontSize: 30 | ||
} | ||
}/> | ||
}> | ||
You type: {this.state.text} | ||
</Text> | ||
<StatusBar hidden={true}/> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
AppRegistry.registerComponent('Style a component ?', () => AutoLayoutComponent); | ||
// skip this line if using Create React Native App | ||
AppRegistry.registerComponent('Example of text input', () => App); |
Binary file not shown.
6 changes: 6 additions & 0 deletions
6
React Native tutorial-9-Handling touches/.idea/jsLibraryMappings.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.