繁体   English   中英

Android图像超过图像

[英]Android images over image

我在屏幕上有一个imageView,我想放置另一个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" />

尝试按照此处所述使用'adjustViewBounds'参数:

<ImageView
  (...)
  android:adjustViewBounds="true" />

如果设置为true,则ImageView将调整其边界以保留其可绘制对象的纵横比。 这可能会解决模拟器与物理设备之间的填充差异。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM