[go: nahoru, domu]

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

GoogleMap inside a Dialog glitches and shows unwanted trasparency #588

Open
matteo-goghero-leitha opened this issue Jun 24, 2024 · 0 comments
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@matteo-goghero-leitha
Copy link
matteo-goghero-leitha commented Jun 24, 2024

Please be sure to include as much information as possible:

Environment details

OS type and version: Android 14 (issue discovered only on Google Pixel 7a)
Library and version: com.google.maps.android:maps-compose:5.0.3
Compose version: BOM 2024.04.00, Compiler 1.5.10

Steps to reproduce

  1. Create a simple layout with some content
  2. Add a composable Dialog on top of this content
  3. Put a GoogleMap inside the aforementioned dialog
  4. Pan and Zoom the map and look closely around streets or railways in particular, you will notice a slight transparency around the border of map's elements that allows to see content beneath the dialog.

Code example

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            Row(modifier = Modifier.fillMaxSize()) {
                Box(Modifier.weight(1f).fillMaxHeight().background(Color.Red))
                Box(Modifier.weight(1f).fillMaxHeight().background(Color.Green))
                Box(Modifier.weight(1f).fillMaxHeight().background(Color.Blue))
            }
            Dialog(
                
            ) {
                GoogleMap()
            }
        }
    }
}

Screenshots

Screenshot_20240624-145451

Screenshot_20240624-145451

This is what happens in our app, sometimes it glitches even worse

Screenshot_20240624-151916

Footnote

This issue has only been observed on Google Pixel 7a, we tested 2 different 7a and both of them have this issue. Other phones with android 14 including S23 ultra and Pixel 4a do not have this issue.

We have also tried to:

  • put a colored box inside the dialog and behind the map
  • draw a filled rectangle with drawBehind modifier
  • set the GoogleMapOptions.backgroundColor property
    but neither of those have resolved the issue.

Thanks.

@matteo-goghero-leitha matteo-goghero-leitha added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant