Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Map remains greyed out when displayed in a DialogFragment #6634

Closed
mattryavec opened this issue Oct 7, 2016 · 3 comments
Closed

Map remains greyed out when displayed in a DialogFragment #6634

mattryavec opened this issue Oct 7, 2016 · 3 comments
Labels
Android Mapbox Maps SDK for Android bug

Comments

@mattryavec
Copy link

Platform: Android
Mapbox SDK version: 4.2.0-beta3

This is a regression from 4.1.1. I've attached a small sample Android Studio app, MapboxBug.zip, that reproduces the issue.

Steps to trigger behavior

  1. Set up a DialogFragment to display a MapView
  2. Trigger a display of the DialogFragment

Expected behavior

Map displays normally (see "Screenshot_4_1_1")
screenshot_4_1_1

Actual behavior

Map displays and appears to be functional, but still has a grey disabled-looking overlay
screenshot_4_2_0

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Oct 8, 2016
@tobrun
Copy link
Member

tobrun commented Oct 8, 2016

This is probably related to the introduction of SurfaceView in #5000. We are going to switch from TextureView to SurfaceView in the 4.2.0 release for performance reasons. I will look into the issue more thoroughly but for now you can use the textureMode(true) option MapboxMapOptions or use textureMode=true in xml to use TextureView instead of SurfaceView.

cc @mapbox/android

@cammace
Copy link
Contributor

cammace commented Oct 19, 2016

Like @tobrun mentioned, this has to do with the upgrade we made to using SurfaceView. For now, enabling texureMode results in the map looking correct:

@zugaldia zugaldia added this to the android-future milestone Oct 19, 2016
@zugaldia zugaldia removed this from the android-v5.0.0 milestone Mar 6, 2017
@tobrun
Copy link
Member

tobrun commented Apr 19, 2017

Using TextureView is a valid workaround. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android bug
Projects
None yet
Development

No branches or pull requests

4 participants