Reputation: 992
I am working on a project where i need to have a map to be shown inside a circle.How can i show a mapview inside a circle.
Upvotes: 1
Views: 275
Reputation: 1844
You can compose the layout with a FrameLayout. The first item must be the MapView and then an ImageView referencing a png with that circle transparent. Hope that helps.
Edited to add an example:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="whateverYourApiKeyIs"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/fullSizeImageWithTransparentCircle"/>
</FrameLayout>
Upvotes: 1
Reputation: 6247
Since you write such a bad question. Allow me to answer in the same style.
Take a mapview.
Style it with round corners
I'll even give you a link to round corners
Upvotes: 0