고요빛물결
앱개발

Redshop의 헤더

· 2016-11-29 (화) 02:23:16 · 1541

탑에는 

 

react-native-vector-icons 를 사용해서 Menu, login, shopping cart와 sir theme 로고를 만들어 봤습니다.

 

https://github.com/oblador/react-native-vector-icons 

에서 세가지와

http://fontawesome.io/icon/bars/ 

http://fontawesome.io/icon/user/ 

http://fontawesome.io/icon/shopping-cart/ 

레드샵의 로고(png)을 이용했습니다.

 

먼저 아래 코드와 같이 import를 해 주시고..

제일 위 header​에 대한 크기를 정해 줍니다.  (여기서는 높이를 50으로..)

marginTop 20은 스마트폰의 상단 status bar에 겹치지 않게 하기 위해서..

 

다음에 navigator를 이용해서 각 아이콘에 대해서 연결해 주면 될것 같습니다.

 

9b0d795078ab2c47ef4a451eab43b05c_1480291658_8059.png
 

 

[code]

import Icon from 'react-native-vector-icons/FontAwesome';

 

<View style={{ alignItems: 'center', margin: 2, marginTop: 20, backgroundColor: 'red', height: 50, flexDirection: 'row'}}>

          <View style={{flex: 1, justifyContent: 'flex-start', flexDirection: 'row'}}>

            <Icon name = 'navicon' color='black' size={32} style={{color: 'white', padding: 2}} />

          </View>

          <ResponsiveImage source={require('./images/mobile_logo.png')} initWidth="200" initHeight="30"/>

          <View style={{flex: 1, justifyContent: 'flex-end', flexDirection: 'row'}}>

            <Icon name='user' color='black' size={32} style={{color: 'white', padding: 2}} />

            <Icon name='shopping-cart' color='black' size={32} style={{color: 'white', padding:2}} />

          </View>

</View>

[/code]

 

댓글을 작성하시려면 로그인이 필요합니다.

소모임

23,243건
+
분류 제목 글쓴이 날짜 조회
앱개발 16-11-30 조회 1,877
앱개발 16-11-30 조회 1,449
소지구 16-11-29 조회 2,834
드론 16-11-29 조회 2,137
정치/경제/사회 16-11-29 조회 2,455
오늘뭐먹지? 16-11-29 조회 1,572
출산육아 16-11-29 조회 985
출산육아 16-11-29 조회 1,014
소지구 16-11-29 조회 2,810
해외사용자 16-11-29 조회 1,610
앱개발
[앱개발]
16-11-29 조회 1,353
앱개발 16-11-29 조회 1,530
앱개발 16-11-29 조회 1,542
소지구 16-11-28 조회 1,721
소지구 16-11-28 조회 1,755
정치/경제/사회
[정치/경제/사회]
16-11-28 조회 2,518
해외사용자
[해외사용자]
16-11-28 조회 1,355
해외사용자
[해외사용자]
16-11-28 조회 1,270
드론 16-11-28 조회 1,712
컴퓨터 16-11-28 조회 2,862
앱개발 16-11-28 조회 1,371
앱개발 16-11-28 조회 1,333
앱개발 16-11-28 조회 1,495
해외사용자
[해외사용자]
16-11-27 조회 1,431
드론 16-11-27 조회 2,528
앱개발 16-11-27 조회 2,061
해외사용자 16-11-27 조회 1,255
모형취미 16-11-27 조회 1,609
출산육아 16-11-27 조회 984
앱개발
[앱개발]
16-11-27 조회 1,124