ImageView后的空白

Mik*_*oos 15 android android-layout

这个ImageView有一些奇怪的东西,在缩小大图像之后还有"自由空间".

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:src="@drawable/bb"
    android:scaleType="fitStart" />
<TextView
    android:id="@+id/textMainBoxTitle"
    android:text="some text"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_weight="1" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

一些屏幕:

Eclipse:
eclipse http://img560.imageshack.us/img560/6218/eclipse.png

模拟器:
模拟器http://img600.imageshack.us/img600/3023/simulator.png

原始图片:
原创http://www.janissary.eu/img/obraz.jpg

为什么我会在图像之后获得空间?

Mik*_*oos 43

我找到了解决方案: 如何在ImageView中缩放图像以保持纵横比

Gratzi写了关于android:adjustViewBounds ="true"来修复isue.