ImageView を含む ScrollView を使用しようとしています。それのための私のxmlコードはこれです:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:fillViewport="true"
android:layout_gravity="right" >
<ImageView
android:id="@+id/tapjoy_dialog_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:src="@drawable/untitled" />
</ScrollView>
奇妙なことに、実行すると、画像の上下に非常に広いパディングが表示されます。私の言いたいことを理解するために、私が添付したスクリーンショットを見てください。
どうすればこれを解決できますか?
もっと奇妙なことに:
ScrollView を削除して ImageView のみを残すと、パディングされず、うまく機能します。
ImageView を削除し、代わりに大きな textView を配置すると、パディングもうまく機能しません。
したがって、問題はScrollViewとImageViewの組み合わせに多少関連していると思います...
ImageView に入れようとしている画像は次のとおりです。