I want to create a TableLayout with a few large buttons with an icon and text. I found several similar questions, but not the one that 1 . My simplified XML format:
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableRow android:id="@+id/TableRow01" android:gravity="center">
<Button android:text="@string/telephone" android:drawableTop="@drawable/phone" android:id="@+id/button_phone"></Button>
<Button android:text="@string/help" android:src="@drawable/help" android:id="@+id/button_help"></Button>
</TableRow>
</TableLayout>
The icon images are a bit large, so I want Android to resize them, but the android: height parameter changes the size of the button, not the inline image. Do you have an idea to get a button with the text and the image "resizeable"?
source
share