How can I prevent an ImageButton
from having a fixed size?
The drawables used in the selector have different size, and I want the ImageButton
to resize itself to match the image size.
I've tried adjustViewBounds
without success.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp" >
<ImageButton
android:id="@+id/picture_imagebutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/tab_background_selector" />
</RelativeLayout>