Androidで以下の機能を取得するにはどうすればよいですか?
画像は外部 URL からのものです。シンプルなスクロールを実現するには?
ボタンを配置するためのアイデアがあります
ただし、以下のスクロール可能な画像の場合、この機能を取得する方法。どの概念を適用する必要がありますか?
Androidで以下の機能を取得するにはどうすればよいですか?
画像は外部 URL からのものです。シンプルなスクロールを実現するには?
ボタンを配置するためのアイデアがあります
ただし、以下のスクロール可能な画像の場合、この機能を取得する方法。どの概念を適用する必要がありますか?
レイアウトでは、画像を水平 LinearLayout でラップし、それらを行として垂直レイアウトでラップしてから、それを HorizontalScrollView でラップします。したがって、次のようなものが得られます。
<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>
を使用するのはどうですかhorizontalScrollView
。私はそれがあなたの目的を解決すると思います。画像を horizontalScrollView に配置し、その中にTableLayout
. 幅を指定しないでください。を指定するだけlayout_weight
です。
あなたは使用することができscrollview horizontally
、その中でセットアップlinearlayout
しimageviews
てそれらの中に入れます。
<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>