Skip to content

Instantly share code, notes, and snippets.

@adrianamendez
Created December 17, 2013 20:07
Show Gist options
  • Save adrianamendez/8011712 to your computer and use it in GitHub Desktop.
Save adrianamendez/8011712 to your computer and use it in GitHub Desktop.
Fixing the rendering problem when use Google Maps Android API v2, it has been tested on Android V. 2.3.6 and 4.0.4, i hope it works for you. Enjoy it! ;D Supported by @felipeska
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.cyrilmottier.polaris2.maps.SupportMapFragment" />
<!-- The usual fragment contains the map, i'm using polaris2,
Polaris is a framework enhancing the Google Maps Android API v2. It aims to
fix some of the most frustrating bugs of the original library and provide additional features. -->
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<!-- This framelayout contains the Map actually Google Maps Android API v2, i use it,
in order to add different views in the same space.-->
<FrameLayout
android:id="@+id/content_map"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@null" >
</FrameLayout>
<!-- Add a view to fix the rendering problem when used with Google Maps Android API v2 -->
<View
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment