我保持三个图像视图与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