我想編寫一個簡單的使用以下佈局的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