How to put a horizontal divisor line between edit text's in a activity


Question

I'm making an activity to configure my app, and I have to divide the sections of my configuration window with a line. I used this: divider_horizontal_bright, from this example:

http://android.cryx.li/doku.php?id=know:settings:start

However it doesn't work! When I test on my android phone, it doesn't show a horizontal line. Why?

I am using Android 2.1

1
80
2/26/2013 8:59:53 AM

Accepted Answer

Try this link.... horizontal rule

That should do the trick.

The code below is xml.

<View
    android:layout_width="fill_parent"
    android:layout_height="2dip"
    android:background="#FF00FF00" />
142
12/7/2016 3:17:15 AM

If this didn't work:

  <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" />

Try this raw View:

<View
    android:layout_width="fill_parent"
    android:layout_height="1dip"
    android:background="#000000" />

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon