Reputation: 24012
This is quiet straight forward. But don't know why this isn't working.
This is the Code i have in the xml:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/one"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:paddingBottom="15dp"
android:background="@drawable/blue9Patch"
android:paddingTop="12dp"
android:text="One" />
<Button
android:id="@+id/shareProductButton_shareOptions"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:paddingBottom="15dp"
android:background="@drawable/blue9Patch"
android:paddingTop="12dp"
android:text="Two" />
</LinearLayout>
This is what i get in the Graphical Layout in Eclipse:
But on the emulator it is like this:
This is the 9-patch image i am using as a Background
Thought, on device it would work fine, but didn't.
I want it to be like the first image.
Thank You.
Upvotes: 0
Views: 143
Reputation: 42016
Clearly I assume you had used .9Patch image with setting content area i.e. assigning pixels on Right and Bottom part. you just need to clear that assignment or just fill all the Bottom and Right end pixel(padding box). Thats it.
Finally this one
Upvotes: 4