Reputation:
I've got relative layout in my view hierarchy and I want it to have this as background:
Here's xml:
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/background"
>
<RelativeLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
>
<TextView
<!-- -->
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:layout_centerVertical="true"
/>
<Spinner
<!-- -->
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"
android:minWidth="200dp"
/>
</RelativeLayout>
<!-- Nested Relative layouts as above go here -->
</RelativeLayout>
And here's what I receive:
It seems that 9patch causes the problem, because I tried other drawables and my layout didn't behave like this. Could you point me what's wrong?
Upvotes: 0
Views: 130
Reputation: 959
Your padding doesn't seem right, the black part on right and bottom should be almost the entire width / height (except rounded corners).
I think it is the result your are waiting for.
Upvotes: 3