0
<ScrollView
    android:id="@+id/scrollView1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

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

    <TextView
        android:id="@+id/te"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="50"
        android:text="TextView1" />

    <TextView
        android:id="@+id/te2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="50"
        android:text="TextView2" />

</LinearLayout> 
</ScrollView>

the problem is i want both TextViews side by side and a scrollview vertically for both the textviews.But it deesn't work like that,when i set the orientation to vertical the textview become one below the another but the scrollview works well.I think you understand what im saying.Pls find me a solution.

Amarjit
  • 4,327
  • 2
  • 34
  • 51
stranger
  • 13
  • 7

1 Answers1

0

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

<TextView
    android:id="@+id/te"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_weight="50"
    android:text="TextView1" />

<TextView
    android:id="@+id/te2"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_weight="50"
    android:text="TextView2" />

Amarjit
  • 4,327
  • 2
  • 34
  • 51