There is something weird about this ImageView, after big image scaled down there is still "free space".
<?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>
Some screens:
Eclipse:
eclipse http://img560.imageshack.us/img560/6218/eclipse.png
simulator:
simulator http://img600.imageshack.us/img600/3023/simulator.png
And the original image:
(source: janissary.eu)
Why am'I getting space after image?
I found solution: How to scale an Image in ImageView to keep the aspect ratio
Gratzi wrote about android:adjustViewBounds="true" which fixes the isue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With