gpt4 book ai didi

native-base - native 基础选项卡 - 知道如何删除选项卡周围的边框吗?

转载 作者:行者123 更新时间:2023-12-04 01:16:38 25 4
gpt4 key购买 nike

以下屏幕截图是下面提供的代码的结果。知道如何移除选项卡周围的边框吗?

enter image description here

import React from 'react';
import { SafeAreaView } from 'react-native';
import { Container, Header, Title, Text, Tabs, Tab } from 'native-base';

export default class Settings extends React.Component {
static navigationOptions = {
header: null
};

render() {
return (
<SafeAreaView style={{ flex: 1 }}>
<Container
style={{ flex: 1, backgroundColor: '#fff', marginTop: 30 }}>
<Header hasTabs transparent>
<Title style={{ color: 'grey' }}>
Settings
</Title>
</Header>

<Tabs tabBarUnderlineStyle={{ backgroundColor: 'blue', height: 1 }}>
<Tab heading="Tab1"
tabStyle={{ backgroundColor: 'white' }}
textStyle={{ color: 'grey' }}
activeTabStyle={{ backgroundColor: 'white' }}
activeTextStyle={{ color: 'blue' }}>
<Text>TODO: Tab1</Text>
</Tab>

<Tab heading="Tab2"
tabStyle={{ backgroundColor: 'white' }}
textStyle={{ color: 'grey' }}
activeTabStyle={{ backgroundColor: 'white' }}
activeTextStyle={{ color: 'blue' }}>
<Text>TODO: Tab2</Text>
</Tab>
</Tabs>

</Container>
</SafeAreaView>
);
}
}

最佳答案

添加tabContainerStyle={{ elevation: 0 }}<Tabs>解决了这个问题。好像是Elevation(阴影)不是Border

关于native-base - native 基础选项卡 - 知道如何删除选项卡周围的边框吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53996695/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com