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.
This is my fragment XML:
<fragment
android:id="@+id/mapFragment"
android:layout_width="100px"
android:layout_height="100px"
class="com.google.android.gms.maps.MapFragment" />
And the only thing I'm doing is setContentView(R.layout.new_main);
and nothing more.
This problem is almost like mine: Android MapView v2 Black screen, and also with no answer.
Please try with the code which is given below:
@Override
public void onResume() {
super.onResume();
mapFragment.onResume();
}
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
from this article: http://developer.android.com/guide/topics/graphics/hardware-accel.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With