0

我正在使用 xml 代码进行水平线性布局:

<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 有一个填充顶部和底部。如何删除填充?

4

1 回答 1

2

Avoid hardcoding the layout_height and layout_width attributes. This may look fine on your device. But may look ugly on another.

于 2012-08-26T13:56:49.787 回答