我想编写一个简单的使用以下布局的MapActivity(仅包含当前的mapview,因为我打算在将来添加与ListView共享屏幕):向地图视图添加圆角
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="200dip"
android:enabled="true"
android:clickable="true"
android:apiKey="mykey"
android:layout_alignParentBottom="true" />
</RelativeLayout>
我已经以具有圆角和笔划施加一个简单的形状,以的MapView:
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp"/>
<stroke android:width="3dp"
android:color="@color/bordure_tables" />
</shape>
我使用以下申请的形状:
mapView.setBackgroundResource(R.layout.map);
问题是它没有任何效果,我看不到我的圆角,也没有中风。
有人请吗? – 2011-05-27 08:39:26
同样的问题!请帮助我们。 – 2011-09-27 03:07:32