0
這個問題已被多次詢問,但沒有一個答案有幫助。ImageView所有四面的額外空白
Android增加了在圖像的所有四邊在ImageView
增加額外的空白空間。對於不同屏幕尺寸的設備,這也是一樣的。我也嘗試改變圖像的分辨率,但無濟於事。
供參考,這是我的XML代碼:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".Starter" >
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:contentDescription="cat"
android:scaleType="fitXY"
android:src="@drawable/splash" />
</LinearLayout>
還附上了圖片的樣子截圖。
如何刪除這些空間?
謝謝。