的顶部绘制一个边框遵循了渐变分隔的例子: http://www.connorgarvey.com/blog/?p=34如何在线性布局
我曾试过把我的线性布局的底部画一条水平线。
这里是我的线性布局文件:
<LinearLayout android:id="@+id/test" android:layout_width="fill_parent"
android:layout_height="wrap_content>
<ImageView android:id="@+id/icon1"
android:layout_width="32dip"
android:layout_height="32dip"
/>
而且我确实添加了
<View
android:background="@drawable/black_white_gradient"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_above="@id/test"
/>
但我看不出有任何线在的LinearLayout的顶部。而当我去层次视图,看看他查看(用于园艺分离器),在的getWidth()为0时的getHeight()为1
能否请你告诉我,我错过了什么?
谢谢。
任何人有任何想法? – n179911 2009-12-18 04:59:27