Solve the problem of using the map in fragment and switching to a black screen

Source: Internet
Author: User

I use a 3D map of the gold, with 2D maps without this problem.

Judging from the answer, it is probably the problem between Surfactview and fragment. Although I use the German, but this method is estimated to Baidu map also effective.

The workaround is to add the following code to OnCreate in activity with the map:

        GetWindow (). SetFormat (pixelformat.translucent);


In addition, there is a group to mention a method, also send it:

As a best practice, add an invisible surfaceview element that is 0px long and wide in the activity's root view.


Solve the problem of using the map in fragment and switching to a black screen

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.