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