【问题标题】:Android imageview Samsung s4 not stretchAndroid imageview三星s4不拉伸
【发布时间】:2014-12-25 12:08:20
【问题描述】:

我在我的应用程序中添加了logo。但我在s4 and tablet devices 中看到了little and bad imagesxxhdpi 文件夹中的图像和资源:577*217...

<ImageView
            android:id="@+id/ford"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/animasyon"
            android:adjustViewBounds="true"
            android:contentDescription="@string/hello_world"
            android:scaleType="fitXY"
            android:src="@drawable/ford" />

1-联结一

2-s4

【问题讨论】:

  • 在问这个问题之前我做了一些研究。我不接受负分。
  • 说诸如 “我不接受负分” 之类的话只会让你得到更多的反对意见。我怀疑用户对您的问题投反对票的原因是您根本不清楚您在问什么。

标签: android layout imageview drawable


【解决方案1】:

使用 match_parent 在所有设备上全屏显示图像比例。

<ImageView
        android:id="@+id/ford"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/animasyon"
        android:adjustViewBounds="true"
        android:contentDescription="@string/hello_world"
        android:scaleType="fitXY"
        android:src="@drawable/ford" />

【讨论】:

  • 谢谢,但我找到了不同的解决方案。 (也许不是很好的解决方案)。我为 image 写了高度和宽度。 (dp)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-02-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多