0
I'm使用XML代碼用於水平的LinearLayout:如何刪除圖像的填充爲水平線性佈局?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="60dip"
android:orientation="horizontal"
android:paddingLeft="5dip"
android:paddingRight="5dip"
android:layout_alignParentBottom="true"
android:background="@drawable/back1"
>
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="60dip"
android:clickable="true"
android:contentDescription="@string/app_name"
android:src="@drawable/ca_18"
android:adjustViewBounds="true"/>
</LinearLayout>
和ImageView的具有填充頂部和底部。我怎樣才能刪除填充?
這可能是因爲你的高度屬性不是wrap_content –
我改爲android:layout_height =「match_parent」(在ImageView中),沒有任何改變 –