Prevent background image from stretching the view

后端 未结 6 1390
予麋鹿
予麋鹿 2021-02-18 12:36

Whenever I assign background to a view that is laid out with wrap_content, if the background image is larger than a view, the view is stretched so that it can hold the entire ba

6条回答
  •  清酒与你
    2021-02-18 13:20

    You can try setting the width and height to something like 60dp instead of wrap_content and use android:scaleType.

提交回复
热议问题