Hello,
The ImageButton in 1.6 exhibits a strange behavior: it looks
different, when created using a XML layout vs. dynamically in code.
-> case 1:
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_btn_round_plus"
android:background="@drawable/btn_circle"
/>
-> case 2:
ImageButton bRemove = new ImageButton(aCtx);
bRemove.setLayoutParams(new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT)
);
bRemove.setBackgroundResource(R.drawable.btn_circle);
bRemove.setImageResource(R.drawable.ic_btn_round_minus);
In case (2), the image is SCALED UP & looks nasty, although in both
cases the imagebutton is placed into a linearlayout with the same
properties.
Anyone else experiencing this strange behavior?
Thanks for any advice,
-szabolcs
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---