[英]the picture is stretched in imageview android
我想制作帶有兩張圖片的動畫,但是它們被固定了。 當我在imageView中打開像src這樣的圖像時,一切正常(圖像1),但是當我運行動畫時,它會進行steretced(圖像2)。
<ImageView
android:id="@+id/iv_exercise_info"
android:layout_width="fill_parent"
android:layout_height="238dp"
android:layout_gravity="center" />
我嘗試設置scaleType fitXY,但是對我沒有幫助。 對不起,我的英語。
我認為為imageview定義的布局是問題所在。 嘗試這個。
<ImageView
android:id="@+id/iv_exercise_info"
android:layout_width="wrap_content"
android:layout_height="238dp"
android:layout_gravity="center" />
希望這能解決您的問題
使用以下代碼:-android:id =“ @ + id / iv_exercise_info” android:layout_width =“ fill_parent” android:layout_height =“ 238dp” android:ScaleType =“ CENTER”
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.