Android Google Map circle shape

允我心安 提交于 2019-12-05 21:32:53
KayAnn

Create a custom view - a Circle. Use it as a child view. Here's a tutorial to do so. Put map fragment inside this view.

Then put ImageView before this custom view inside RelativeLayout as explained in this answer.

May be help for you. It working fine. In this png circle is transperent.

<RelativeLayout
        android:layout_width="250dp"
        android:layout_height="250dp"
        android:layout_centerInParent="true">

        <com.google.android.gms.maps.MapView
            android:id="@+id/mapview"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/back" />

    </RelativeLayout>

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!