开发者

Changing the appearance of a custom android checkbox without the image scaling?

开发者 https://www.devze.com 2022-12-28 01:49 出处:网络
I have a custom checkbox with these attributes: android:id=\"@+id/map_toolbar_details\" android:layout_width=\"80px\"

I have a custom checkbox with these attributes:

android:id="@+id/map_toolbar_details"
android:layout_width="80px"
android:layout_height="106px"
android:scaleType="center"
macro:selectedResource="@drawable/map_toolbar_details_selected"
android:button="@drawable/map_toolbar_details"

When I load it up, the image gets stretched, even though it's set to scaleType center. If I set a background, I do not h开发者_如何学编程ave this problem.


android:layout_width="80px" android:layout_height="106px" change this part make it whether exact size of the image or both wrap_content

wrap_content

when you set another image background it will automatically adjust itself to that image size

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号