Il y a quelque chose de bizarre à propos de cette ImageView, après la réduction de la taille de l'image, il y a toujours de "l'espace libre".Espace vide après 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>
Certains écrans:
Eclipse:
eclipse http://img560.imageshack.us/img560/6218/eclipse.png
simulateur:
simulator http://img600.imageshack.us/img600/3023/simulator.png
Et l'image originale:
Pourquoi obtenir de l'espace après l'image?
L'image est correcte. Si je change de startstart pour l'adapter, l'image sera dessinée en bas et l'espace noir sera en haut. Il n'y a pas de problème dans Java, je pense. Il est inclus dans main.xml et rempli horizontalement et enveloppé verticalement. – Mikooos