Card looking Layout
<p>I'm making a Dialog which has a card-like corners. But I can't quite make it look like a card.I can make corners but still part above the red radius color is being shown on the dialog. I tried everything but I can't make it work. Can someone help me? My main layout is cardView and I put my shape layout in the background of the Linear Layout.<a href="https://i.stack.imgur.com/E0YDn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E0YDn.jpg" alt="enter image description here"></a></p>

<pre><code>&lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt;
&lt;solid android:color="#FFFFFF"/&gt;
&lt;stroke
    android:width="6dip"
    android:color="#f45"/&gt;
&lt;corners android:radius="15dip"/&gt;
&lt;padding
    android:bottom="0dip"
    android:left="0dip"
    android:right="0dp"
    android:top="0dip"/&gt;
</code></pre>

<p></p>

<p><a href="https://i.stack.imgur.com/nkrcW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nkrcW.jpg" alt="enter image description here"></a></p>

<pre><code>&lt;android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp"&gt;

&lt;LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@drawable/layout_bg"
    &gt;

    &lt;TextView
        android:id="@+id/textView7"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="15dp"
        android:text="Bits Please"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:foreground="@android:color/transparent"/&gt;

    &lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0.5dp"
        android:layout_alignParentEnd="false"
        android:layout_alignParentStart="false"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:layout_weight="1"
        android:background="#030202"
        android:orientation="horizontal"&gt;
    &lt;/LinearLayout&gt;

    &lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical"&gt;

        &lt;TextView
            android:id="@+id/textView8"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:layout_marginTop="10dp"
            android:text="text"/&gt;
    &lt;/LinearLayout&gt;

    &lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:paddingBottom="10dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp"&gt;

        &lt;TextView
            android:id="@+id/textView9"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="15dp"
           /&gt;

        &lt;TextView
            android:id="@+id/textView10"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="15dp"
           /&gt;

        &lt;TextView
            android:id="@+id/textView11"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="15dp"
          /&gt;
    &lt;/LinearLayout&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p></p>