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.
            Asked
            
        
        
            Active
            
        
            Viewed 155 times
        
    -4
            
            
        - 
                    You want to make them horizontal scroll or vertical ? – Somesh Kumar Jun 09 '16 at 11:28
- 
                    @SomeshKumar vertical – Pushpam Kumar Jun 09 '16 at 11:35
- 
                    Possible duplicates - http://stackoverflow.com/questions/6674341/how-to-use-scrollview-in-android – Onkar Nene Jun 09 '16 at 11:42
- 
                    maybe you're looking for this.. http://stackoverflow.com/questions/1748977/making-textview-scrollable-in-android – Somesh Kumar Jun 09 '16 at 12:43
1 Answers
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
 
    