Issue in displaying activity as an dialog
<p>I have an activity class. For this Activity class i have an xml layout. I want to display this activity class as an dialog, So to do so in the manifest i do the following change.</p>

<pre><code> &lt;activity
    android:name=".AlarmDialogActivity"
    android:theme="@android:style/Theme.Dialog"&gt;            
 &lt;/activity&gt; 
</code></pre>

<p>When i run my app the activity class display as dialog, But the width of the is compressed, it not take the full screen of the device..why does this happen, can anyone help me to solve this out?</p>

<p><strong>Code for xml layout</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/layout_alarm_dialog"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="#E0D5B1"
    android:gravity="center_vertical|center_horizontal"
    android:orientation="vertical" &gt;

        &lt;TextView
            android:id="@+id/dialog_title_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:text="@string/dialog_title_text"
            android:textColor="#e89192"
            android:textSize="18dp" &gt;
        &lt;/TextView&gt;

        &lt;ListView
            android:id="@+id/alarm_list_view"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="15dp"
            android:layout_marginTop="10dp"
            android:cacheColorHint="#00000000"
            android:divider="@null"
            android:dividerHeight="0dp"
            android:listSelector="#00000000" &gt;
        &lt;/ListView&gt;

    &lt;LinearLayout
        android:id="@+id/bottom_control_bar"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:layout_marginTop="10dp"
        android:gravity="center_horizontal|center_vertical" &gt;

        &lt;Button
            android:id="@+id/button_dismiss"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/button_dismiss_text"
            android:textColor="#121212"
            android:textSize="18dp" &gt;
        &lt;/Button&gt;
    &lt;/LinearLayout&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p><strong>Screenshot of the dialog</strong></p>

<p><img src="http://i.stack.imgur.com/TdyEA.png" alt="enter image description here"></p>
