Hi, I have tried to draw a horizontal line at the BOTTOM of my linear layout.
Here is my linear layout file: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center_vertical"> <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" /> </LinearLayout> </LinearLayout> And I follow your advice and I did add <View android:background="@drawable/black_white_gradient" android:layout_width="fill_parent" android:layout_height="1dp" android:layout_above="@id/test" /> But i dont' see any line at the bottom of the LinearLayout. And when I go to Hierarchy View and see he View (for the hort separator), the getWidth() is 0 while getHeight() is 1. Can you please tell me what am I missing? I have follow the example in for teh gradient dividers: http://www.connorgarvey.com/blog/?p=34 Thank you very much for more pointers. On Tue, Dec 1, 2009 at 9:31 PM, Mark Murphy <mmur...@commonsware.com> wrote: > > > Hi, > > > > Between each row in list view, android draw a horizontal line (fades away > > at > > both ends). > > If I have a LinearLayout view, how can i add a border like that? > > Add a 1px high View with a suitable background color or gradient in > between each of your other widgets in the LinearLayout. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com > Android App Developer Books: http://commonsware.com/books.html > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en