I am styling a Button whose width can change in the program through different Content. I got the png files from the designer like this:
[Left Border] [Background (just a strip with the gradient)] [Right Border]
I thought I'm fine with assigning the Properties of the Button like this:
Background: Background.png
Drawable left: LeftBorder.png
Drawable right: RightBorder.png
BUT it shall not be like that ;) Right now the Background.png begins where the Drawable Left begins and ends at the end of Drawable Right. Is using those Drawable Properties not the right way in this case?
Here is the Code:
<Button
android:text="@+id/Button01"
android:id="@+id/Button01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/top_loaction_left"
android:drawableRight="@drawable/top_loaction_right"
android:background="@drawable/top_loaction_bg"></Button>
..