地图片段后可恢复黑 [英] Map fragment is black after resume

查看:132
本文介绍了地图片段后可恢复黑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序,对她的主屏幕上的地图(V2)的按钮。这些按钮点击运行之后另一个应用程序,这(主要活动)是堆栈。之后在另一个活动被称为完成(),主要活动是背在前面。但在此之后,地图片段黑色,它不工作。

I have application that have on her main screen map (v2) with buttons. These buttons after click run another application and this (main activity) is in stack. After in that another activity is called finish(),main activity is back in front. But after this, map fragment is black and it's not working.

这是我的XML片段:

<fragment
    android:id="@+id/mapFragment"
    android:layout_width="100px"
    android:layout_height="100px"
    class="com.google.android.gms.maps.MapFragment" />

和我做的唯一的事情就是的setContentView(R.layout.new_main); ,仅此而已。

And the only thing I'm doing is setContentView(R.layout.new_main); and nothing more.

这问题几乎是像我这样的: Android的图形页面V2黑屏,也没有答案。

This problem is almost like mine: Android MapView v2 Black screen, and also with no answer.

推荐答案

我关闭硬件加速,在文件的manifest.xml,和我的应用程序犯规秀黑色第二负载再次地图。我尝试在模拟器。

I Disable hardware acceleration at file manifest.xml, and my application doesnt show black map again in second load. i try it in emulator.

<application android:hardwareAccelerated="false">
 ...
</application

从这篇文章: http://developer.android.com/指南/主题/图形/硬件accel.html

这篇关于地图片段后可恢复黑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆