3 回答

TA貢獻(xiàn)2011條經(jīng)驗(yàn) 獲得超2個(gè)贊
選項(xiàng)1:形狀可繪制
drawable
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <solid android:color="#8fff93" /> <stroke android:width="1px" android:color="#000" /></shape>
solid
background="@drawable/your_shape_drawable"
備選案文2:背景視圖
RelativeLayout
BorderView
<View android:id="@+id/border" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBottom="@+id/image" android:layout_alignLeft="@+id/image" android:layout_alignRight="@+id/image" android:layout_alignTop="@+id/main_image" android:background="#000" /><ImageView android:id="@+id/image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_... android:padding="1px" android:src="@drawable/..." />
adjustViewBounds=true
RelativeLayout
RelativeLayout
View
Shape
備選方案3:9-補(bǔ)丁
android:background="@drawable/..."
Shape
備選方案4:額外視圖
LinearLayout
View
<View android:background="#000" android:layout_width="match_parent" android:layout_height="1px"/>
- 3 回答
- 0 關(guān)注
- 320 瀏覽
添加回答
舉報(bào)