Below is the layout of an item of recyclerview.I want to create a vertical view at left of each item of layout such that it matches the height of the item.I used below code-

```
<RelativeLayout 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_margin="10dp"  
        android:background="@drawable/foodvitebackground">

    <TextView 
         android:id="@+id/invitename" 
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:textSize="18dp"
         android:textColor="@color/adsd"
         android:text="fasf"
         android:layout_marginTop="10dp" 
         android:layout_marginLeft="15dp"/>

    <TextView 
         android:id="@+id/name" 
         android:layout_width="match_parent"
         android:layout_height="wrap_content" 
         android:layout_below="@+id/invitename" 
         android:layout_marginTop="8dp" 
         android:layout_marginLeft="15dp"
         android:layout_toLeftOf="@+id/profileimage" 
         android:gravity="left" 
         android:textColor="@color/foodvite_invitename" 
         android:textSize="20dp" 
         android:text="Fill-a Pita"/>

    <TextView 
         android:id="@+id/jJoinTime" 
         android:layout_width="wrap_content"
         android:layout_height="wrap_content" 
         android:layout_below="@+id/name" 
         android:layout_marginTop="8dp"
         android:layout_marginLeft="15dp"
         android:textSize="12dp" 
         android:text="Today,8:30PM"
         android:textColor="@color/joinTime"/>

    <com.mikhaellopez.circularimageview.CircularImageView  
         android:id="@+id/profileimage"
         android:layout_width="@dimen/hundred_dp"   
         android:layout_height="@dimen/hundred_dp"    
         android:layout_alignParentRight="true" 
         android:layout_centerVertical="true" 
         android:layout_marginRight="15dp" 
        android:scaleType="fitCenter"/>

    <TextView 
        android:id="@+id/invitescount"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="20" 
        android:textColor="@color/white"
        android:paddingLeft="3dp" 
        android:paddingRight="3dp" 
        android:background="@drawable/ret"
        android:layout_marginBottom="15dp" 
        android:layout_marginRight="15dp" 
        android:layout_alignBottom="@+id/message"     
        android:layout_alignRight="@+id/profileimage" 
        android:layout_alignEnd="@+id/profileimage"/>

    <View 
        android:id="@+id/leftbar" 
        android:layout_width="6dp" 
        android:layout_height="match_parent" 
        android:layout_alignParentLeft="true"
        android:background="@drawable/foodviterespoded"/>

</RelativeLayout>

```

With above code i don't see view with id leftbar visible.However if i change height of that view from match\_parent to some numerical value like 160dp then i see the left bar view visible.Why is this happening.And i don't want to set height in numerical value bcoz i want my view to stretch to complete height of item and height of item might be different in different device.