I have following layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/item_background"
android:layout_margin="10dip"
android:gravity="center_vertical">
<View
android:layout_width="30dip"
android:layout_height="fill_parent"
android:background="@color/test_color"/>
<ImageView
android:id="@+id/task_item_startstop_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/start_task"
android:layout_centerVertical="true"
android:focusable="false"
android:background="#0000"/>
<View
android:id="@+id/task_item_line"
android:layout_width="2dp"
android:layout_height="40dip"
android:layout_margin="5dip"
android:background="@color/line_color"
android:layout_toRightOf="@id/task_item_startstop_button"/>
<TextView
android:id="@+id/task_item_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:textSize="22sp"
android:textStyle="bold"
android:layout_toRightOf="@id/task_item_line" />
<TextView
android:id="@+id/task_item_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/task_item_suspended"
android:textSize="18sp"
android:textColor="@android:color/black"
android:layout_toRightOf="@id/task_item_line"
android:layout_below="@id/task_item_title"/>
<TextView
android:id="@+id/task_item_timer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:textSize="18sp"
android:textColor="@android:color/black"
android:layout_toRightOf="@id/task_item_status"
android:layout_below="@id/task_item_title"/>
</RelativeLayout>
I want to have vertical line (first view inside root layout) on th left of layout with fixed width and height equal parent's height. But if I set layout_height="fill_parent" it doesn't help. Height is 0. If I set height for example 40dip, it will be 40 dip. But I need exactly fill_parent property.