Custom style for dialog or disable inheriting of activity style
<p>Im trying to set my custom style for dialog because dialog inherit style from activity where is padding set to 10 dpi. But everything what i tried failed :).</p>

<p>style:</p>

<pre><code>&lt;style name="ActivityStyle" parent="@android:style/Theme.Holo.NoActionBar"&gt;
    &lt;item name="android:windowBackground"&gt;@android:color/transparent&lt;/item&gt;
    &lt;item name="android:windowIsTranslucent"&gt;true&lt;/item&gt;
    &lt;item name="android:padding"&gt;10dp&lt;/item&gt;
&lt;/style&gt;
</code></pre>

<p>dialog style:</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_root"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" &gt;

    &lt;LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_marginTop="5dip"
        android:orientation="horizontal" &gt;

        &lt;TextView
            android:layout_width="70dip"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dip"
            android:text="@string/CreateRoomDialog_textName"
            android:textColor="#FFFFFF"
            android:textSize="14sp" /&gt;

        &lt;EditText
            android:id="@+id/CreateRoomDialog_fieldName"
            android:layout_width="0dip"
            android:layout_height="38dip"
            android:layout_marginLeft="10dip"
            android:layout_marginRight="10dip"
            android:layout_weight="1"
            android:inputType="text"
            android:textSize="12sp" /&gt;
    &lt;/LinearLayout&gt;

    &lt;LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="horizontal" &gt;

        &lt;TextView
            android:layout_width="70dip"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dip"
            android:text="@string/CreateRoomDialog_textPwd"
            android:textColor="#FFFFFF"
            android:textSize="14sp" /&gt;

        &lt;EditText
            android:id="@+id/CreateRoomDialog_fieldPwd"
            android:layout_width="0dip"
            android:layout_height="38dip"
            android:layout_marginLeft="10dip"
            android:layout_marginRight="10dip"
            android:layout_weight="1"
            android:inputType="textPassword"
            android:textSize="12sp" /&gt;
    &lt;/LinearLayout&gt;

    &lt;LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingLeft="2dip"
        android:paddingRight="2dip"
        android:paddingTop="4dip" &gt;

        &lt;Button
            android:id="@+id/CreateRoomDialog_btnCancel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="right"
            android:layout_weight="1"
            android:text="@android:string/cancel" /&gt;

        &lt;Button
            android:id="@+id/CreateRoomDialog_btnOK"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="left"
            android:layout_weight="1"
            android:text="@android:string/ok" /&gt;
    &lt;/LinearLayout&gt;

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

<p>custom dialog consturctor:</p>

<pre><code>public CreateRoomDialog(Context c, boolean isNew) {
        super(c); - I tried put style here, but no success.

        this.c = c;
        this.isNew = isNew;

        this.setTitle(c.getString(R.string.CreateRoomDialog_addData));
        setContentView(R.layout.createroomdialog);

    }
</code></pre>

<p>with padding it looks like:</p>

<p><img src="http://i.stack.imgur.com/TAVOf.png" alt="with padding"></p>

<p>without padding dialog is ok, but activity doesnt:</p>

<p><img src="http://i.stack.imgur.com/Qyiwo.png" alt="without padding"></p>
