0
我正在使用react-navigation。在DrawerContent中,我添加了所有需要的東西,使抽屜的背景變爲綠色,同時它只覆蓋抽屜的一半。這是抽屜的代碼和圖像。 Here is the image背景顏色只包含抽屜的一半
import React, { Component } from "react";
import { View, ScrollView,Button,Text,StyleSheet } from "react-native";
import { DrawerItems } from 'react-navigation';
const DrawerContent = (props) => (
<View style={style.container}>
<DrawerItems {...props} />
</View>
);
const style = StyleSheet.create({
container: {
flex:1
height: null,
backgroundColor: '#00FF00',
},
});
export default DrawerContent;
我把大多數代碼從反應導航文檔,以便有內查看標籤。你見過上面的圖片嗎? –