I've implemented a custom compass and want to replace the default compass on a google map by mine. For that I've to put my rotating compass image in front ofthe google map. The problem is that my image is always put on the background and, so, hidden by the map. Here's the XML code.
Hope you could find a solution !
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="end"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginBottom="0dp"
android:layout_marginTop="20dp"
android:gravity="bottom"/>
<TextView
android:id="@+id/textDist"
android:layout_width="286dp"
android:layout_height="wrap_content"
android:text="TextView" />
<ImageView
android:id="@+id/imageCompass"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="25dp"
android:src="@drawable/ic_compass"
android:gravity="top" />
Thanks !