我保持三個圖像視圖與3個不同的相同高度的圖像。我的代碼如下所述..Android:圖像視圖的佈局問題
<LinearLayout
android:id="@+id/LinearLayout06"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left" android:layout_gravity="center_vertical|center_horizontal">
<ImageView
android:id="@+id/stopServiceButton"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@null"
android:paddingRight="5dp"
android:src="@drawable/stop_service_button_selector" />
<ImageView
android:id="@+id/calibrateButton"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@null"
android:padding="5dp"
android:src="@drawable/calibrate_button_selector" />
<ImageView
android:id="@+id/doneButton"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@null"
android:padding="5dp"
android:src="@drawable/done_button_selector" />
</LinearLayout>
在大的佈局我能夠管理這些圖像(我沒有使用重量參數吧),但對於小的佈局,我必須保持體重參數作爲一個將它們安裝在屏幕上,但高度變化如下所示。
有人可以幫我解決嗎?
你爲什麼要用android:src來添加背景?嘗試使用android:background – 2012-03-26 14:00:40
檢查通過替換所有imageview寬度fillparent和重量1 – 2012-03-26 14:04:28
是啊,改變到背景工作,但圖像中的文字變得模糊 – 2012-03-26 14:11:29