1

Androidで以下の機能を取得するにはどうすればよいですか?

画像は外部 URL からのものです。シンプルなスクロールを実現するには?

ボタンを配置するためのアイデアがあります

ただし、以下のスクロール可能な画像の場合、この機能を取得する方法。どの概念を適用する必要がありますか?

ここに画像の説明を入力

4

3 に答える 3

0

レイアウトでは、画像を水平 LinearLayout でラップし、それらを行として垂直レイアウトでラップしてから、それを Horizo​​ntalScrollView でラップします。したがって、次のようなものが得られます。

<HorizontalScrollView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" >
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical" >
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >
                <Images... />
        </LinearLayout>
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >
                <Images.. />
        </LinearLayout>
    </LinearLayout>
</HorizontalScrollView>
于 2013-09-29T15:42:01.063 に答える
0

を使用するのはどうですかhorizontalScrollView。私はそれがあなたの目的を解決すると思います。画像を horizo​​ntalScrollView に配置し、その中にTableLayout. 幅を指定しないでください。を指定するだけlayout_weightです。

于 2013-09-29T15:44:47.260 に答える
0

あなたは使用することができscrollview horizontally、その中でセットアップlinearlayoutimageviewsてそれらの中に入れます。

<HorizontalScrollView
    android:id="@+id/horizontalScrollView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal" >

        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/cone" />

<ImageView
    android:id="@+id/imageView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/cone" />            

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal" >

        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/cone" />

<ImageView
    android:id="@+id/imageView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/cone" />            

    </LinearLayout>

    </LinearLayout>

</HorizontalScrollView>
于 2013-09-29T15:45:16.840 に答える