Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Android bug homescreen transparency when goBack #3722

Closed
matteohcf opened this issue Dec 10, 2024 · 1 comment
Closed

[Bug]: Android bug homescreen transparency when goBack #3722

matteohcf opened this issue Dec 10, 2024 · 1 comment

Comments

@matteohcf
Copy link

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, { useEffect, useMemo, useRef, useState } from 'react';
import Mapbox from '@rnmapbox/maps';

Mapbox.setAccessToken(CONFIG.MAPBOX_ACCESS_TOKEN);

export 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

592a60e0-9a8a-484d-b8f1-4f8847d45e8a.MP4

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 ^^^

@matteohcf matteohcf added the bug 🪲 Something isn't working label Dec 10, 2024
Copy link

Lint failed 😭

Please fix the errors in your code example - More info.:

error: 'CONFIG' is not defined (no-undef) at example.tsx:5:23:
  3 | import Mapbox from '@rnmapbox/maps';
  4 | 
> 5 | Mapbox.setAccessToken(CONFIG.MAPBOX_ACCESS_TOKEN);
    |                       ^
  6 | 
  7 | export const Map = () => {
  8 |   const camera = useRef<Mapbox.Camera>(null);


error: Prefer default export on a file with single export (import/prefer-default-export) at example.tsx:7:1:
   5 | Mapbox.setAccessToken(CONFIG.MAPBOX_ACCESS_TOKEN);
   6 | 
>  7 | export const Map = () => {
     | ^
   8 |   const camera = useRef<Mapbox.Camera>(null);
   9 |   const map = useRef<Mapbox.MapView>(null);
  10 | 


error: 'View' is not defined (react/jsx-no-undef) at example.tsx:14:6:
  12 | 
  13 |   return (
> 14 |     <View>
     |      ^
  15 |         <Mapbox.MapView
  16 |           ref={map}
  17 |           styleURL="mapbox://styles/mapbox/light-v11"


error: 'View' is not defined (no-undef) at example.tsx:14:6:
  12 | 
  13 |   return (
> 14 |     <View>
     |      ^
  15 |         <Mapbox.MapView
  16 |           ref={map}
  17 |           styleURL="mapbox://styles/mapbox/light-v11"


4 errors found.```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant