Skip to content
Snippets Groups Projects
Commit 03623be7 authored by Botond Ortutay's avatar Botond Ortutay
Browse files

Exercise 4.3 done and deemed ready

parent 0bdcef5b
Branches
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ import { Card } from 'react-native-paper';
const Stack = createStackNavigator();
class screen1 extends React.Component {
class noteScrn extends React.Component {
state = {
inpText: "",
lONotes: ["Note 1","Note 2","Note 3","Note 4","Note 5","Note 6","Note 7","Note 8","Note 9","Note 10","Note 11","Note 12","Note 13","Note 14","Note 15","Note 16","Note 17","Note 18","Note 19","Note 20","Note 21"]
......@@ -24,14 +24,15 @@ class screen1 extends React.Component {
render() {
return (
<View style={styles.mainContainer}>
<ScrollView>
{this.state.lONotes.map(note => <Text>{note}</Text>)}
<View style={styles.botPos}>
</ScrollView>
<View style={styles.bottomPos}>
<TextInput
style={styles.input}
placeholder = "Enter text here"
onChangeText={this.updateIText}
/>
<Button
title="ADD NOTE"
onPress={() => {
......@@ -39,7 +40,6 @@ class screen1 extends React.Component {
this.forceUpdate(); // Uudelleenrenderöi
}}
/>
</View>
</View>
);
......@@ -50,7 +50,7 @@ export default function App() {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="Notes">
<Stack.Screen name="Notes" component={screen1} />
<Stack.Screen name="Notes" component={noteScrn} />
</Stack.Navigator>
</NavigationContainer>
);
......@@ -62,7 +62,7 @@ const styles = StyleSheet.create({
backgroundColor: '#ffffff'
},
botPos:{
bottomPos:{
bottom:0,
backgroundColor: '#ffffff'
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment