图像显示在LinearLayout拉伸?

时间:2012-07-23 17:30:11

标签: android android-linearlayout android-imageview

我在LinearLayout内显示图片时遇到问题。我正在尝试获取白色的背景颜色并在ImageView中显示LinearLayout,图像和背景颜色可以找到,但图像会被拉伸。

图像比例的一个好方法是显示它显示正常吗?有什么想法吗?

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   android:orientation="vertical"
   android:background="#FFFFFF">
<LinearLayout
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical"
  >
  <ImageView
    android:src="@drawable/day1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
  </ImageView>
</LinearLayout>
</ScrollView>

0 个答案:

没有答案