[Bug]: Android bug homescreen transparency when goBack
Mapbox Implementation
Mapbox
Mapbox Version
10.1.31
React Native Version
0.74.3
Platform
Android
@rnmapbox/maps version
10.1.31
Standalone component to reproduce
import React, { useRef } from 'react';
import Mapbox from '@rnmapbox/maps';
import {View} from "react-native";
Mapbox.setAccessToken('YOUR_MAPBOX_ACCESS_TOKEN');
const Map = () => {
const camera = useRef<Mapbox.Camera>(null);
const map = useRef<Mapbox.MapView>(null);
const zoomLevel = 10;
return (
<View>
<Mapbox.MapView
ref={map}
styleURL="mapbox://styles/mapbox/light-v11"
projection={'globe'}
logoEnabled={false}
attributionEnabled={false}
scaleBarEnabled={false}>
<Mapbox.Camera ref={camera} zoomLevel={zoomLevel} animationMode={'flyTo'} animationDuration={2000} />
</Mapbox.MapView>
</View>
);
};
Observed behavior and steps to reproduce
https://github.com/user-attachments/assets/51f632d0-d039-4291-a32d-34b052db5828
Expected behavior
Video ^^^
Notes / preliminary analysis
I tried:
- change backgroundColor
- change and put navigation.navigate('Home') instead of goBack
- change header transparency and put it with a color
IMPORTANT: the bug is only with the android build, in debug mode it works good (ONLY WITH SOME ANDROID, NOT ALL)
Additional links and references
Video ^^^
this is because of scaleBarEnabled={false} in release mode. do you find any solution. if we change scaleBarPosition then issue is same. basiically i dont want scaleBar on the top of map. Any solution PLease share.
@matteohcf can you post more details?! I don't know what's happening on the video. Was the back button pressed, what is that etc. Can you repro in android emulator?
Can you change surfaceView?
https://rnmapbox.github.io/docs/components/MapView#surfaceview