android-autobgbutton
android-autobgbutton copied to clipboard
background image dimension broken
when i set a background image the width and height are incorrect, but when i use ImageButton are correct the simple code comparison is:
<it.testproj.test.SAutoBgButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_alignParentLeft="true" android:layout_centerVertical="true" android:background="@drawable/btn_web_back" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="80dp"
android:layout_centerVertical="true"
android:background="@drawable/btn_web_back" />
on left SAutoBgButton and on right ImageButton
it's a bug of your lib or i need to set other params?? thank you
It could probably be an implementation difference between Button
and ImageButton
. I'm not exactly sure. The drawable doesn't really do anything besides setting a color filter and alpha.
a ok, but can you solve it?
thank you for answer
Will try to look into it if I can. Feel free to make a pull request if you've fixed though.
Just a short note on this. A Button extends a TextView where the ImageButton extends an ImageView, so there is a difference in the implementation