Positioning a badge bubble on the left upper side of a button
<p>I am trying to add a badge to one of my Activity's button. Right now I am trying to do the xml.
The Button with the badge, should look like this:</p>

<p><img src="http://i.stack.imgur.com/a4sE8.png" alt="alt text"></p>

<p>I have already done the bubble and the text inside using a <code>RelativeLayout</code>:</p>

<pre><code>&lt;RelativeLayout android:layout_width="wrap_content" 
            android:layout_height="wrap_content"&gt;

            &lt;ImageView android:layout_width="wrap_content" 
                android:layout_height="wrap_content"
                android:adjustViewBounds="true"
                android:src="@drawable/badge"
                android:layout_centerInParent="true"/&gt;

             &lt;TextView android:layout_width="wrap_content" 
                       android:layout_height="wrap_content"
                       android:textStyle="bold"
                       android:text="2"
                       android:layout_centerInParent="true" /&gt;
         &lt;/RelativeLayout&gt;
</code></pre>

<p>But I can't find a way to place it there and making it work on portrait and landscape with the same xml.</p>

<p>The Buttoms in the <code>Activity</code> are like this:</p>

<pre><code>&lt;Button android:id="@+id/new_releases_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/ic_button_selector"
            android:text="@string/new_releases_title"
            android:textColor="#FFFFFF"
            android:textSize="20sp"
            android:gravity="center_vertical"
            android:paddingLeft="12dp"
            android:layout_marginTop="15dp"
            android:layout_below="@id/coming_soon_button"
            android:onClick="newReleaseClick"
            android:layout_centerHorizontal="true" /&gt;

        &lt;Button android:id="@+id/top_sellers_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/ic_button_selector"
            android:text="@string/top_sellers_title"
            android:textColor="#FFFFFF"
            android:textSize="20sp"
            android:gravity="center_vertical"
            android:paddingLeft="12dp"
            android:layout_marginTop="15dp"
            android:layout_below="@id/new_releases_button"
            android:onClick="topSellersClick"
            android:layout_centerHorizontal="true" /&gt;
</code></pre>

<p>and here are the two resources:</p>

<p><img src="http://i.stack.imgur.com/AVlNF.png" alt="alt text">
<img src="http://i.stack.imgur.com/Nfkfp.png" alt="alt text"></p>

<p>How should I do the xml?</p>

<p>EDIT:
Best approach so far, but it still doesn't work:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"&gt;

        &lt;Button android:id="@+id/discounts_button"
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content" 
                android:background="@drawable/ic_button_selector"
                android:text="@string/discounts_title"
                android:textColor="#FFFFFF"
                android:textSize="20sp"
                android:onClick="discountsClick"
                android:layout_marginTop="40dp"
                android:layout_marginLeft="20dp"/&gt;

        &lt;RelativeLayout android:layout_width="wrap_content" 
                android:layout_height="wrap_content"
                android:layout_gravity="top|left"&gt;

            &lt;ImageView android:layout_width="wrap_content" 
                    android:layout_height="wrap_content"
                    android:adjustViewBounds="true"
                    android:src="@drawable/badge"
                    android:layout_centerInParent="true"/&gt;

             &lt;TextView android:layout_width="wrap_content" 
                           android:layout_height="wrap_content"
                           android:textStyle="bold"
                           android:text="20"
                           android:layout_centerInParent="true" /&gt;
         &lt;/RelativeLayout&gt;
&lt;/FrameLayout&gt;
</code></pre>
