I want to achieve the following effect in an Android application:

As a background, I use a nine-image png image. I tried it like this with just one text view
<ImageView android:id="@+id/myImageView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/rowimage" /> <TextView android:id="@+id/myImageViewText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/myImageView" android:layout_alignTop="@+id/myImageView" android:layout_alignRight="@+id/myImageView" android:layout_alignBottom="@+id/myImageView" android:layout_margin="1dp" android:gravity="center" android:text="Hello" android:textColor="#000000" />
But this is what I get as a result

Any ideas on something wrong? How can I achieve the effect of the first image?
Edit:
I updated my xml to relative layout, now I get the following result

Why image with nine patches does not scale with text
source share