Professional Documents
Culture Documents
20808144077
Project: Recreate a Popular App
5.1.1 Choose an App
At this point, we’ve written programs to recreate screens from popular apps such as:
SnapChat
Venmo
Google
In this project, you’ll choose a different app to recreate. You’ll only be creating one screen of
the app, so try to find an app that includes the following:
buttons
some sort of text input
an interesting layout
List at least 3 ideas here and include links to images of the screen you’d like to recreate if
available. Check with your teacher to make sure one of your selections is a good challenge
and includes the right components.
<Image
<View style={styles.Box4}>
source={{ uri:
'https://codehs.com/uploads/98b49a6a86952527d6c572d87bc04955' }}
style={{ height: 45, width: 200, marginLeft: 20, marginTop: <Text style={styles.Title8}>
30 }} New to Netflix?
/> </Text>
<Text style={styles.Title6}>
Need help?
</Text>
Box3: { Title5: {
height: deviceHeight/15, fontSize: 13,
width: deviceWidth, fontFamily: "Arial",
flexDirection: "row", color: "#7f7f7f",
justifyContent: "flex-start", textAlign: "flex-start",
alignItems: "flex-start", marginRight: 70,
marginLeft: 25, marginTop: 2,
marginTop: 30, },
}, Title6: {
Box4: { fontSize: 13,
height: deviceHeight/2, fontFamily: "Arial",
width: deviceWidth, color: "#7f7f7f",
flexDirection: "row", textAlign: "flex-end",
justifyContent: "flex-start", marginLeft: 10,
alignItems: "flex-start", marginTop: 2,
marginLeft: 25, },
}, Title7: {
Title1: { fontSize: 13,
fontSize: 28, fontFamily: "Arial",
fontFamily: "Arial Black", color: "#7f7f7f",
fontWidth: "bold", textAlign: "center",
color: "white", marginTop: 5,
textAlign: "flex-start", },
marginTop: 45, Title8: {
marginLeft: 25, fontSize: 13,
}, fontFamily: "Arial",
Title2: { color: "#7f7f7f",
fontSize: 17, textAlign: "flex-start",
fontFamily: "Arial", },
color: "#7f7f7f", Title9: {
height: deviceHeight/13, fontSize: 13,
width: deviceWidth/1.2, fontFamily: "Arial",
backgroundColor: "#333333", color: "white",
textAlign: "center", textAlign: "flex-end",
margin: 6, marginLeft: 7,
borderRadius: 4, },
}, });
Title3: {
fontSize: 17,
fontFamily: "Arial",
color: "#7f7f7f",
height: deviceHeight/13,
width: deviceWidth/1.2,
backgroundColor: "#333333",
textAlign: "center",
margin: 6,
borderRadius: 4,
},
Title4: {
fontSize: 17,
fontFamily: "Arial",
color: "white",
height: deviceHeight/13,
width: deviceWidth/1.2,
backgroundColor: "red",
textAlign: "center",
marginTop: 25,
borderRadius: 4,
},
5.1.5 Add Functionality
In this exercise, you’ll put it all together by adding functionality to your app screen layout.
Copy and paste the code you wrote in the last exercise and add in the functionality of each
button and text box. Use customized alerts to show what would happen in your app as each
button is pressed.
import React, { Component } from 'react'; <Text style={styles.Title4}>
import { AppRegistry, Text, View, StyleSheet, Image, TouchableHighlight, Sign In
ImageBackground, Alert, Dimensions, TextInput } from 'react-native'; </Text>
import Constants from 'expo-constants'; </TouchableHighlight>
<View style={styles.Box2}>
export default class App extends Component {
state = {
password: 'password', <Image
name: 'Email or phone number' source={{ uri:
} 'https://codehs.com/uploads/4c6688dd077ebd12b500718fe78d3033' }}
style={{ height: 17, width: 17, marginRight: 5 }}
/>
render() { <Text style={styles.Title5}>
return ( Remember me
<View style={styles.container}> </Text>
<Image <TouchableHighlight
source={{ uri: onPress={() => {
'https://codehs.com/uploads/98b49a6a86952527d6c572d87bc04955' }} alert('What do you want me to do?')
style={{ height: 45, width: 200, marginLeft: 20, marginTop: 30 }} }}
/> >
<Text style={styles.Title6}>
<Text style={styles.Title1}> Need help?
Sign In </Text>
</Text> </TouchableHighlight>
Screenshoot Unit 1
Screenshoot Unit 2
Screenshoot Unit 3
Screenshoot Unit 4
Screenshoot Unit 5