커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
Flex..
[왕초보] 나만의 수익성 앱, 앱개발 종합반 v5
2주차
북마크
조*은
댓글
3
추천
0
조회수
11
조회수
11
답변 완료

import { StatusBar } from 'expo-status-bar';

import React from 'react';

import { __SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED } from 'react';

import { ScrollView, StyleSheet, Text, View, TouchableOpacity, SafeAreaView, Button, Alert, Touchable, Image } from 'react-native';

import favicon from "./assets/favicon.png"


export default function App() {

const customAlert = () => {

Alert.alert("팝업창이 뜹니다")

}


const customAlert1 = () => {

Alert.alert("폭발직전")

}


return (

<SafeAreaView style={styles.container}>

<ScrollView style={styles.containerZero}>

<View style={styles.containerOne}>

<TouchableOpacity style={styles.textContainer} onPress={customAlert}>

<Text style={styles.textStyle}>영역을 충분히 갖는 텍스트 입니다!</Text>

</TouchableOpacity>

<TouchableOpacity style={styles.textContainer} onPress={customAlert}>

<Text style={styles.textStyle}>영역을 충분히 갖는 텍스트 입니다!</Text>

</TouchableOpacity>

<TouchableOpacity style={styles.textContainer} onPress={customAlert}>

<Text style={styles.textStyle}>영역을 충분히 갖는 텍스트 입니다!</Text>

</TouchableOpacity>

</View>


<View style={styles.containerTwo}>

<TouchableOpacity style={styles.textContainer} onPress={customAlert}>

<Text style={styles.textStyle}>영역을 충분히 갖는 텍스트 입니다!</Text>

</TouchableOpacity>

<TouchableOpacity style={styles.textContainer} onPress={customAlert}>

<Text style={styles.textStyle}>영역을 충분히 갖는 텍스트 입니다!</Text>

</TouchableOpacity>

<TouchableOpacity style={styles.textContainer} onPress={customAlert}>

<Text style={styles.textStyle}>영역을 충분히 갖는 텍스트 입니다!</Text>

</TouchableOpacity>

</View>

<View style={styles.containerThree}>

<TouchableOpacity style={styles.imageContainer} onPress={customAlert1}>

<Image

source={favicon}

resizeMode={"repeat"}

style={styles.imageStyle}

/>

</TouchableOpacity>

</View>

</ScrollView>

</SafeAreaView>

);

}


const styles = StyleSheet.create({

containerZero: {

flex: 1,

backgroundColor: '#fff',

},

containerOne: {

flex: 1,

backgroundColor: 'red',

},

containerTwo: {

flex: 1,

backgroundColor: 'blue',

},

containerThree: {

flex: 1,

backgroundColor: 'blue',

},

textContainer: {

flex:1,

justifyContent: 'center',

backgroundColor:'green',

height:100,

borderColor:'green',

borderWidth:5,

borderRadius:10,

margin:10,

},

textStyle: {

textAlign:"center",

},

imageContainer:{

height:100,

borderColor:'green',

borderWidth:1,

borderRadius:10,

margin:10,

padding:15

},


imageStyle: {

flex: 1,

width: 370,

height: 100

}

});


expo는 연결되어 있는데 그냥 백지상태로 뜹니다.. 코드스니펫 다른거 입력하면 뜨는데 어디를 수정해야 할까요,,



취소
 공유
취소
댓글 0
댓글 알림
나의얼굴