Possible Duplicate:
Android Drawing Separator/Divider Line in Layout?
In my activity I have two Linearlayouts having weights 1 in a parent Linearlayout having weight 2. Now I want to draw a line between the two child Linearlayouts ?
Possible Duplicate:
Android Drawing Separator/Divider Line in Layout?
In my activity I have two Linearlayouts having weights 1 in a parent Linearlayout having weight 2. Now I want to draw a line between the two child Linearlayouts ?
Regardless of weight, you can draw an horizontal line by using a view, for example:
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="#ffffffff" />
Just make another LinearLayout between the 2 child layouts - Simple example here 2 Child LinearLayouts with 2 textviews each.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"/>
</LinearLayout>
<!-- In between 2 child layouts -->
<LinearLayout
android:layout_height="3dp"
android:layout_width="fill_parent"
android:background="@android:color/white"/>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"/>
</LinearLayout>
</LinearLayout>