ギャラリー ビューの両端に画像 (前後の画像) を配置する方法を教えてください。水平方向にスクロールするメニューをリストするギャラリーがあり、このギャラリーは RelativeLayout にあり、スクロールせずにギャラリーの両端にある画像を取得するにはどうすればよいですか。
前もって感謝します。
ギャラリー ビューの両端に画像 (前後の画像) を配置する方法を教えてください。水平方向にスクロールするメニューをリストするギャラリーがあり、このギャラリーは RelativeLayout にあり、スクロールせずにギャラリーの両端にある画像を取得するにはどうすればよいですか。
前もって感謝します。
Praveenの答えを少し変更します:
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" />
<Gallery android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1"/>
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
android:layout_weight="1" in はここで非常に重要です。
答えはあなたの質問そのものにあります。imageview
両側に置きます。サンプルレイアウトは次のようになります
<LinearLayout>
<ImageView....../>
<Gallery .../>
<ImageView .../>
</LinearLayout>
それが役に立てば幸い。