HorizontalScrollView を使います
java.lang.Object
↳ android.view.View
↳ android.view.ViewGroup
↳ android.widget.FrameLayout
↳ android.widget.HorizontalScrollView
その名の通り ScrollView の横バージョンです
HorizontalScrollView は ScrollView と同様一つしか子ビューを持てないので
LineaLayout などにまとめて入れてやります
というわけで, HorizontalScrollView をいじってみた
XMLリソース
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/HorizontalScrollView">
<LinearLayout
android:id="@+id/LinearLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="HorizontalScrollViewTest">
</TextView>
・
・
・
</LinearLayout>
</HorizontalScrollView>
アクティビティー側で setContentView で設定プログラムを実行すると...
こんな感じ!
一番下にスクロールバーが表示されています
参考サイト
http://developer.android.com/intl/ja/reference/android/widget/HorizontalScrollView.html


0 件のコメント:
コメントを投稿