Multiple Textviews In A Scrollview
I have an activity which is displaying walking directions as text. I have a group of TextViews, 5 contain 'Step x' where x is the step number and 5 more TextViews which contain the
Solution 1:
You can just put all your text views into a LinearLayout and then put that layout into the ScrollView.
Solution 2:
Here's how I'd do it:
<ScrollViewxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="fill_parent"android:layout_height="fill_parent"android:scrollbars="horizontal"android:id="@+id/ScrollView"><LinearLayoutandroid:layout_width="fill_parent"android:orientation="vertical"android:id="@+id/linearLayout1"android:layout_height="fill_parent"android:layout_gravity="center_vertical|center_horizontal"><TextViewandroid:text="@string/textView1"android:id="@+id/textView1"android:layout_width="280dip"android:layout_height="60dip"></TextView><TextViewandroid:text="@string/textView2"android:id="@+id/textView2"android:layout_width="280dip"android:layout_height="60dip"></TextView><TextViewandroid:text="@string/textView3"android:id="@+id/textView3"android:layout_width="280dip"android:layout_height="60dip"></TextView><TextViewandroid:text="@string/textView4"android:id="@+id/textView4"android:layout_width="280dip"android:layout_height="60dip"></TextView></LinearLayout></ScrollView>
Post a Comment for "Multiple Textviews In A Scrollview"