-4

i have layout with 2 textView which are arrange horizontally . textView is use for the display data which are retrieve from sqlite database and i want to add scroll view in this layout without changing the arrangement of textView.plese help me this is argent.

A. Wali
  • 454
  • 3
  • 22

1 Answers1

0

I think you want this.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

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

            <TextView
                android:id="@+id/xTv1"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"/>

            <TextView
                android:id="@+id/xTv2"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"/>

        </LinearLayout>

    </ScrollView>


</LinearLayout>
Kumar M
  • 994
  • 6
  • 21