我在屏幕上有一个imageView,我想在imageview的底部放置另一个图像视图(它就像一条小线),我将行与主imageView对齐,问题是它在主imageView和行之间留下了一点空白,
在模拟器中,它完美地对齐了,但在设备中,它留出了一点空白,就像paddingbottom一样,我不知道为什么
这是屏幕
http://s2.subirimagenes.com/otros/previo/thump_8473957photoscreen.jpg
带有文本"Manolo“的白色区域应该在底部,但有一个小空白处
这就是代码(全部都在linearLayout中)
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/inferior"
android:layout_below="@+id/superior"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:scaleType="fitXY"
android:src="@drawable/ic_launcher" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/imageView1"
android:layout_alignBottom="@+id/imageView1"
android:layout_centerHorizontal="true"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:src="@drawable/fondonombretransparencia" />发布于 2013-06-04 16:33:23
尝试按照here中的说明使用'adjustViewBounds‘参数
<ImageView
(...)
android:adjustViewBounds="true" />如果设置为true,则ImageView将调整其边界以保留其可绘制对象的纵横比。这可能会解决模拟器和物理设备之间的填充差异。
https://stackoverflow.com/questions/16899783
复制相似问题