I have a relative layout with transparent background and a some views arranged in the middle, i inflate this layout and add it to the main layout with addView(), the inflated view just adds the middle elements in the corner to the parent layout, how can i make the added view occupy all the screen (tried fill_parent but it just gets ignored) This is the view i inflate
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/transparent" >
<RelativeLayout
android:id="@+id/layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@color/info_bar_bg_color" >
<ImageView
android:id="@+id/channel_pic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/channel_pic"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/title_color"
android:textSize="@dimen/title_text_size" />
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/date_color"
android:textSize="@dimen/date_text_size" />
<TextView
android:id="@+id/hourStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/date"
android:textColor="@color/title_color"
android:textSize="@dimen/title_text_size" />
<TextView
android:id="@+id/hourEnd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/hourStart"
android:textColor="@color/title_color"
android:textSize="@dimen/title_text_size" />
<ImageView
android:id="@+id/share_pic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="@drawable/epgshare_0" />
<ImageView
android:id="@+id/bell_pic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/share_pic"
android:src="@drawable/epgsharebell_0" />
</RelativeLayout>
</RelativeLayout>
and this is the main layout i add the view to
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ic_launcher"
tools:context=".MainActivity" >
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:onClick="openInfoBar"
android:text="Open InfoBar" />
</RelativeLayout>