커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
배치가 아닌 글씨 자체 가운데정렬법을 알고싶어요
[왕초보] 나만의 수익성 앱, 앱개발 종합반 v5
2주차
북마크
배*영
댓글
1
추천
0
조회수
4
조회수
4
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.


문장위치가 아닌 글씨 자체를 가운데 정렬하는 방법을 알고싶어요.

어떻게 검색해도 전체를 가운데 두는 방법만 나옵니다.


스파르타 즉문즉답





작성한 코드 및 에러 메세지

import React from 'react'

import { View, Text, StyleSheet, Image, TouchableOpacity } from 'react-native'


const main = 'https://firebasestorage.googleapis.com/v0/b/sparta-image.appspot.com/o/lecture%2FaboutImage.png?alt=media&token=13e1c4f6-b802-4975-9773-e305fc7475c4'


export default function AboutPage() {

  return (

    <View style={styles.container}>

      <Text style={styles.title}>HI! 스파르타코딩 앱개발 반에 오신것을 환영합니다</Text>

      <View style={styles.containerOne}>

        <Image style={styles.mainImage} source={{ uri: main }}></Image>

        <Text style={styles.textOne}>많은 내용을 간결하게 담아내려 노력했습니다!</Text>

      </View>

    </View>)

}


const styles = StyleSheet.create({

  container: {

    backgroundColor: 'navy',

    flex: 1

  },

  containerOne: {

    width: '82%',

    height: 525,

    backgroundColor: 'white',

    marginTop: 50,

    margin: 35,

    borderRadius: 30

  },

  title: {

    color: 'white',

    width: '85%',

    fontSize: 25,

    fontWeight: '700',

    marginTop: 50,

    marginLeft: 30

  },

  mainImage: {

    width: 160,

    height: 160,

    marginTop: 80,

    marginLeft: '25%',

    borderRadius: 30

  },

  textOne: {

    width: '80%',

    fontSize: 16,

    fontWeight: '700',

    margin:5,

    alignSelf:"center"

  }

})

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