Sunday, April 22, 2012

Android: how to draw a horizontal ruler.

<View
android:layout_width="fill_parent"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_height="1dp"
android:background="?android:attr/listDivider" />

You can just enter the above code segment in the interested layout xml file and in the place where you want the horizontal ruler and change the android parameters according to your needs of the Android application.

Have fun.

No comments: