0

横にスクロールしたい8000ピクセルの長さの画像があります。画像をImageViewとしてHorizo​​ntalScrollViewに挿入し、物理デバイス(Samsung galaxy nexus)で実行すると、スクロールバーに画像が読み込まれたことが示されますが、画像が表示されません。すべてがAndroidxmlビューアに正しく表示されます。これがhorizo​​ntalScrollViewの私のxmlです:

<HorizontalScrollView
    android:id="@+id/horizontalScrollView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/TableRow01"
    android:scrollbars="horizontal" >

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >

        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="14dp"
            android:src="@drawable/longimage" />
    </LinearLayout>

</HorizontalScrollView>

画像を他のいくつかのレイアウトで単独でラップしようとしましたが、デバイスで何も機能しませんでした。前もって感謝します。

4

1 に答える 1

0

imageView のパラメーターを match_parent に変更できます。

于 2013-03-04T17:08:55.537 に答える