我有一個ImageView和EditText的自定義列表視圖,我的問題是,與不同的圖像ImageView的大小是不同的,如照片。 我如何確保所有圖像具有相同的尺寸?ListView中不同的ImageView大小查看
這是我的XML代碼:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
<ImageView
android:id="@+id/imageView1"
android:layout_width="150px"
android:layout_height="150px"
android:adjustViewBounds="true"
android:layout_weight="0.1"
android:scaleType="fitXY"
android:layout_marginBottom="1dp"/>
嘗試android:scaleType =「fitCenter」scaleType –
Simone - 如果你已經解決了你自己的問題,請在下面添加回答。 –