我尝试使用海拔 0 属性隐藏标题阴影。
在 Android 10 上,它不起作用。标题是灰色的。在其他版本中,它可以工作。
我正在使用 React Navigation V5。
海拔 0 的 Android 10:
我的代码:
<Stack.Navigator>
<Stack.Screen
name="DiscountsReleaseDetail"
component={DiscountsReleaseDetail}
options={({ navigation, route }) => {
const { numSeq, codMaquina } = route.params.order;
return {
headerTitle: `Pedido ${numSeq}/${codMaquina}`,
headerTitleAlign: 'center',
headerBackTitleVisible: false,
headerTintColor: '#fff',
headerStyle: {
backgroundColor: colorCompany,
shadowOpacity: 0, // remove shadow on iOS
elevation: 0, // remove shadow on Android
},
headerLeft: () => (
<HeaderButtonBack
onPress={() => {
navigation.reset({ …Run Code Online (Sandbox Code Playgroud)