我正在做一个活动来配置我的应用程序,我必须用一条线来划分我的配置窗口的各个部分。我在这个例子中使用了这个:divider_horizontal_bright
:
http://android.cryx.li/doku.php?id=know:settings:start
然而,它不起作用!当我在我的android手机上测试时,它没有显示一条水平线。为什么?
我使用的是Android 2.1
发布于 2010-11-10 23:49:45
尝试此链接....horizontal rule
这应该能起到作用。
下面的代码是xml。
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
android:background="#FF00FF00" />
发布于 2010-11-10 23:51:49
如果这不起作用:
<ImageView
android:layout_gravity="center_horizontal"
android:paddingTop="10px"
android:paddingBottom="5px"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:src="@android:drawable/divider_horizontal_bright" />
尝试此原始视图:
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="#000000" />
发布于 2014-04-25 11:46:27
对于只有一行代码,您需要
...
<View android:id="@+id/primerdivisor"
android:layout_height="2dp"
android:layout_width="fill_parent"
android:background="#ffffff" />
...
https://stackoverflow.com/questions/4146221
复制相似问题