[英]Image shown in imageview too small in android despite being wrap_content for height and width
[英]How does scaleType and wrap_content determine ImageView width and height?
我試圖了解layout_width/height設置為“wrap_content”時如何與scaleType一起“goes”? AFAIK, scaleType (假設'center_fit' )負責放大或縮小圖像大小,但是當寬度或高度設置為wrap_content 時,是否意味着ImageView的寬度和高度將從圖像(可繪制) 尺寸? 那么為什么在這種情況下,drawable 會被縮放呢?
scaleType 定義了在寬度和高度不匹配/不合適的情況下您希望圖像如何顯示,例如 fitCenter 使其居中並適合,而 fitXY 如果它有空格則拉伸它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.