我看了很多關於Stackoverflow的問題,並嘗試了很多解決方法,但仍然無法使用。調整圖像大小以適合Imageview
我想實現什麼:
但我實現這一目標:
這是我目前的XML代碼:
<ImageView
android:id="@+id/image"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_below="@+id/text"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/ic_action_search" />
如何去使用它嗎?是否有任何教程或示例代碼?因爲我正在使用它在lazyload類的listview中加載圖像。謝謝! – MrYanDao 2012-08-07 11:55:00
對不起沒有意識到你使用的是一個listview,可能不是最好的選擇(由於垂直滾動)。 如果您看一下繪圖和縮放代碼,它應該可以幫助您。 – Ljdawson 2012-08-07 12:09:38
好吧,會好的!非常感謝^^ – MrYanDao 2012-08-07 12:11:34