Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid v2 MapFragment shaking when scrolling in Scrollview
    primarykey
    data
    text
    <p>I am using the SupportMapFragment to display a static map in a ScrollView. I do not like to move / zoom the Map, just showing where the location is. </p> <p>When I am scrolling down/up the map shakes inside its bounds, it feels pretty laggy. My question is, how is ist possible to remove this lag, or how to use a static version of the v2 api map.</p> <p>This is my layout: </p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="@dimen/margin_half" android:background="@color/white" android:orientation="vertical" &gt; ... &lt;fragment android:id="@+id/fragmentMap" android:name="com.google.android.gms.maps.SupportMapFragment" android:layout_width="match_parent" android:layout_height="300dp" android:layout_alignParentLeft="true" android:layout_below="@id/viewDivider" android:layout_margin="@dimen/margin_half" /&gt; &lt;View android:layout_width="match_parent" android:layout_height="300dp" android:layout_alignBottom="@id/fragmentMap" android:layout_alignLeft="@id/fragmentMap" android:layout_alignRight="@id/fragmentMap" android:layout_alignTop="@id/fragmentMap" android:background="@android:color/transparent" /&gt; ... &lt;/RelativeLayout&gt; </code></pre> <p>This is not really related to <a href="https://stackoverflow.com/questions/13746351/mapfragment-in-scrollview">MapFragment in ScrollView</a>, even though i used this trick to remove the black clipping on older devices, as you can see with the transparent view. </p> <p>I also disabled all gestures and the click-ability of the maps view: </p> <pre><code>getMap().getUiSettings().setAllGesturesEnabled(false); getMap().getUiSettings().setZoomControlsEnabled(false); getMap().getUiSettings().setMyLocationButtonEnabled(false); ... mapView.setClickable(false); mapView.setFocusable(false); mapView.setDuplicateParentStateEnabled(false); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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