welcome to this little tutorial about an (in my opinion) undocumented feature how to stretch the background of buttons niceley.
Let's start from scratch.
Just a simple Activity with three buttons of different size.
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- <Button android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:text="Small" />
- <Button android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:text="MediumMediumMedium" />
- <Button android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:text="LongLongLongLongLongLongLongLongLong" />
- </LinearLayout>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
Greetings,
DaRolla