Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle map is unresponsive after resume application
    text
    copied!<p>I am working on Google map using api v2,i have added code to display map and it working,but i have two problems, 1.when map is displayed and then device is locked,then after unlocking device onResume() of fragment is called and map fragment is not responde(i can't scroll or zoom it). 2.I also have a button on same view,onClick of that button opens a mail intent.so application is paused,after that when user moves to application map fragment is black and map is not loaded.</p> <p>i have try by seting <code>android:hardwareAccelerated="false"</code> as <a href="https://stackoverflow.com/questions/18330589/map-fragment-is-black-after-resume">stackoverflow post</a> suggest,but it is not working for me.</p> <p>my code inside oncreate is-</p> <pre><code>map = ((SupportMapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap(); MarkerOptions marker = new MarkerOptions(); marker.position(myPosition); marker.title(myTitle); Marker locationMarker = map.addMarker(marker); locationMarker.showInfoWindow(); map.moveCamera(CameraUpdateFactory.newLatLngZoom(myPosition, 15)); map.animateCamera(CameraUpdateFactory.zoomTo(15), 2000, null); </code></pre> <p>I ahve also try by removing child view using -</p> <pre><code>ViewGroup parent = (ViewGroup) v.getParent(); if (parent != null) parent.removeView(v); </code></pre> <p>and also used below code in onResume() of my mapFragment -</p> <pre><code>SupportMapFragment fragments = ((SupportMapFragment) getFragmentManager().findFragmentById(R.id.map)); if(fragment!=null){ FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction(); ft.remove(fragments); ft.commit(); } </code></pre> <p>Please help me where i am missing.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload