title: Android Horizontal Scroll View
body: <p>i have a layout having many fields and i wish to add scrollbars for both horizontal and vertical layout.But vertical scroll is working horizontal scroll is not working.I have loaded the text fields dynamically in program and add the fields with web service . </p>
  
  <p>My Activity</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/LayoutScroll"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:scrollbars="horizontal|vertical" &gt;
  
  &lt;LinearLayout
      android:id="@+id/linearLayout2"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_marginBottom="10dp"
      android:layout_marginTop="30dp"
      android:gravity="fill|fill_horizontal"
      android:orientation="vertical" &gt;
  
        &lt;TableRow
            android:id="@+id/Row_User_Deletion"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#DF0101"
            android:gravity="center" &gt;
  
           &lt;TextView
               android:id="@+id/user_creation_id"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:text="@string/txt_delete_user_userDeletion"
               android:textColor="@color/white"
               android:textSize="15dp" /&gt;
       &lt;/TableRow&gt;
  
        &lt;TableRow
            android:id="@+id/RowUserType"
            android:layout_width="match_parent"
            android:layout_height="45dp"
            android:layout_marginTop="10dp" &gt;
  
            &lt;TextView
                android:id="@+id/txt_delete_user_selectuserType"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:text="@string/txt_delete_user_selectuserType"
                android:textColor="#424242" /&gt;
  
            &lt;Spinner
                android:id="@+id/spin_delete_userType"
                android:layout_width="120dp"
                android:layout_height="50dp"
                android:layout_marginBottom="5dp"
                android:entries="@array/utype" /&gt;
  
            &lt;Button
                android:id="@+id/btn_spinner_user_search_select"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="25dp"
                android:layout_marginTop="5dp"
                android:background="@drawable/redbtn"
                android:text="@string/btn_delete_user_search_user" /&gt;
  
        &lt;/TableRow&gt;
  
      &lt;TableRow
          android:id="@+id/deleteUserRow"
          android:layout_width="match_parent"
          android:layout_height="34dp"
          android:layout_marginTop="10dp"
          android:gravity="fill" &gt;
  
          &lt;TextView
              android:id="@+id/textView1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/txt_user_creation_userId"
              android:textColor="#424242" /&gt;
  
          &lt;EditText
              android:id="@+id/txt_user_delete"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginRight="5dp"
              android:ems="10" &gt;
  
              &lt;requestFocus /&gt;
          &lt;/EditText&gt;
  
          &lt;Button
              android:id="@+id/button1"
              android:layout_width="55dp"
              android:layout_height="wrap_content"
              android:layout_marginRight="5dp"
              android:background="@drawable/redbtn"
              android:text="@string/btn_delete_user_search_user" /&gt;
  
          &lt;/TableRow&gt;
  
  
           &lt;TableLayout
               android:id="@+id/delete_userDetails_Table"
               android:layout_width="match_parent"
               android:layout_height="wrap_content"
               android:layout_marginTop="5dp"
               android:orientation="vertical"
               android:stretchColumns="*" &gt;
  
              &lt;TableRow
                  android:id="@+id/tableRow2"
                  android:layout_width="fill_parent"
                  android:layout_height="match_parent"
                  android:layout_marginTop="5dp"
                  android:background="@color/red" &gt;
  
                  &lt;TextView
                      android:id="@+id/textView2"
                      android:layout_width="fill_parent"
                      android:layout_height="match_parent"
                      android:text="@string/txt_delete_user_select"
                      android:textColor="@color/white" /&gt;
  
                  &lt;TextView
                      android:id="@+id/textView3"
                      android:layout_width="fill_parent"
                      android:layout_height="match_parent"
                      android:text="@string/txt_user_creation_userId"
                      android:textColor="@color/white" /&gt;
  
                  &lt;TextView
                      android:id="@+id/textView4"
                      android:layout_width="fill_parent"
                      android:layout_height="match_parent"
                      android:text="@string/txt_user_creation_userName"
                      android:textColor="@color/white" /&gt;
  
                  &lt;TextView
                      android:id="@+id/textView5"
                      android:layout_width="fill_parent"
                      android:layout_height="match_parent"
                      android:text="@string/txt_delete_user_UserRole"
                      android:textColor="@color/white" /&gt;
  
                  &lt;TextView
                      android:id="@+id/textView5"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"
                      android:text="@string/txt_componentmaster_createdDate"
                      android:textColor="@color/white" /&gt;
  
                  &lt;TextView
                      android:id="@+id/textView5"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"
                      android:text="@string/txt_componentmaster_createdBy"
                      android:textColor="@color/white" /&gt;
              &lt;/TableRow&gt;
          &lt;/TableLayout&gt;
  
      &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>ImageView</p>
  
  <p><img src="https://i.stack.imgur.com/CIEkk.jpg" alt="enter image description here"></p>