圆角贴图mapView [英] Rounded corner mapbox mapView

查看:457
本文介绍了圆角贴图mapView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我正在尝试使用mapbox mapView向我的Android应用添加一个小型迷你地图.我正在尝试添加圆角,但似乎找不到找到这种方法的方法.有什么好方法吗?我知道一种选择是使用CardView,但似乎并没有绕过地图的角落.

So I'm trying to add a small mini map to my android app with a mapbox mapView. I'm trying to add rounded corners to it and I can't seem to find a way to do that. Is there a good way to do this? I know one option is to use a CardView but it doesn't seem to round the corners of the map.

推荐答案

<android.support.v7.widget.CardView
    android:layout_width="match_parent"
    android:layout_height="400dp"
    app:cardCornerRadius="12dp"
    app:cardElevation="12dp">

    Put your mapview in here

</android.support.v7.widget.CardView>

此卡应该最适合您.

这篇关于圆角贴图mapView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆