728x90
반응형

전체 글 630

React native issue 탭 네비게이션 헤더 문제.

탭 네비게이션의 경우 헤더가 생기지 않는다. 그렇기 때문에 스텍 네비게이터로 감싼것을 탭 네비게이션의 스크린에 추가를 해준다. const Test_1 =createStackNavigator( { NotiMain: { screen: NotiMain }, WriteBoard:{ screen: WriteBoard } } ) const Test_2 = createStackNavigator( { SuggestionsBoard: { screen: SuggestionsBoard }, WriteBoard:{ screen: WriteBoard } } ) const Test_3 = createStackNavigator( { QnABoard: { screen: QnABoard }, WriteBoard:{ screen: Wr..

React Native 2020.01.29

React native Drawer 커스텀 메뉴

// 옆에 사이드에서 보여지는것 ( 드로어 네비게이터 메뉴 ) const Main_Draw_View = createDrawerNavigator( { Main_View, Intro_Main : { screen : Intro_Main }, CalenderMain:{ screen :CalenderMain }, BoardMain :{ screen: BoardMain } },{ drawerWidth: Dimensions.get("window").width * 0.5, contentComponent : SideMenu, contentOptions:{ // activeBackgroundColor:'#32C5E6' activeTintColor : '#32C5E6' } } ) contentComponent : 커스텀 할..

React Native 2020.01.28

react-native 해더 중앙 정렬 및 버튼

static navigationOptions = { // 헤더의 오른쪽에 버튼 만들기 headerRight: () => ( alert('This is a button!')} title="Info" color="#fff" /> ), // 헤더의 왼쪽에 버튼 만들기 headerLeft: () => ( alert('This is a button!')} title="Info" color="#fff" /> ), // 헤더의 텍스트를 가운데로 정렬 headerTitleAlign: 'center', }; 또는 해더 자체에 컴포넌트를 넣을 수 있다 , static navigationOptions = { headerTitle: () => , }; class Title extends Component { render(){..

React Native 2020.01.27

React Native ToastAndroid

import React from 'react' //'react-native'에서 ToastAndroid 가져오기 import { View, Text, ToastAndroid } from 'react-native' let styles const Toast = () => { let { container, button} = styles // ToastAndroid.show()를 호출하는 basicToast 메서드 만들기 const basicToast = () => { ToastAndroid.show('Hello World!', ToastAndroid.LONG) } // ToastAndroid.showWithGravity()를 호출하는 gravityToast 메서드 만들기 const gravityToast = ..

React Native 2020.01.17
728x90
반응형