我是 React-Native 的新手,正在学习它。在学习react-native-tab-view时,我尝试改变它的颜色,但经过几次尝试后我无法做到这一点。如果有人指导我如何更改默认为蓝色的选项卡栏的颜色,我将非常感激。这是 npm react-native-tab-view 的链接,这是一段代码。任何帮助将不胜感激。
import * as React from 'react';
import { View, StyleSheet, Dimensions } from 'react-native';
import { TabView, SceneMap } from 'react-native-tab-view';
const FirstRoute = () => (
<View style={[styles.scene, { backgroundColor: '#ff4081' }]} />
);
const SecondRoute = () => (
<View style={[styles.scene, { backgroundColor: '#673ab7' }]} />
);
const initialLayout = { width: Dimensions.get('window').width };
export default function TabViewExample() {
const [index, setIndex] = React.useState(0);
const [routes] = React.useState([
{ key: …Run Code Online (Sandbox Code Playgroud)