1
獲得的頂部和下方的相對佈局的黑色帶這裏是我的代碼無法在Android的
<RelativeLayout
android:id="@+id/layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/black_strip_top"
android:layout_width="wrap_content"
android:layout_above="@id/left_strip"
android:layout_height="2dp"
android:background="@color/black" />
<ImageView
android:id="@+id/black_strip_below"
android:layout_width="wrap_content"
android:layout_below="@id/left_strip"
android:layout_height="2dp"
android:background="@color/black" />
<ImageView
android:id="@+id/left_strip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/left_strip" />
<ImageView
android:id="@+id/right_strip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/image"
android:src="@drawable/right_strip" />
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="fitXY" />
</RelativeLayout>
我想在頂部和下面的圖片中有2DP的黑色帶。但我無法得到它。請幫助我。
甜......還有一件事......我需要的頂部和下方的黑線來對頂部和左側的上下和右邊的地帶。目前它只是在圖像的頂部和下方纔會出現... – 2012-08-16 09:18:21
我修改了源代碼以放大頂部和底部條以將它們對齊到左側和右側條(而不是像之前一樣) – fegabe 2012-08-16 09:24:30
Thanks Man ......:D – 2012-08-16 11:56:45