title: Android: scroll part of screen horizontal and vertical
body: <p>on the screen I need to populate some report type of data. I need to do horizontal and vertical scroll for part of the screen.</p>
  
  <p>How to achieve this task...? </p>
  
  <p><img src="https://i.stack.imgur.com/mjdOk.jpg" alt="enter image description here"></p>
  
  <p>I try following code but it not work:</p>
  
  <pre><code>&lt;HorizontalScrollView
      android:layout_width="match_parent"
      android:layout_height="wrap_content" &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical" &gt;
  
          &lt;TableLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:shrinkColumns="*"
              android:stretchColumns="**" &gt;
  
              &lt;TableRow
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content" &gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_span="2"
                      android:text="Sl No."
                      android:textColor="@color/black" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_span="4"
                      android:text="SubDivision"
                      android:textColor="@color/black" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_span="4"
                      android:text="Total No. of Works"
                      android:textColor="@color/black" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_span="3"
                      android:text="Completed"
                      android:textColor="@color/black" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_span="3"
                      android:text="In-progress"
                      android:textColor="@color/black" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_span="3"
                      android:text="Award Cost(in Lakh)"
                      android:textColor="@color/black" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_span="3"
                      android:text="Value of Work Done(in Lakh)"
                      android:textColor="@color/black" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_span="3"
                      android:text="Payment Made(in Lakh)"
                      android:textColor="@color/black" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_span="3"
                      android:text="Balance to be Paid(in Lakh)"
                      android:textColor="@color/black" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_span="2"
                      android:text="% Paid"
                      android:textColor="@color/black" /&gt;
              &lt;/TableRow&gt;
          &lt;/TableLayout&gt;
  
          &lt;ListView
              android:layout_width="match_parent"
              android:layout_height="wrap_content" &gt;
          &lt;/ListView&gt;
      &lt;/LinearLayout&gt;
  &lt;/HorizontalScrollView&gt;
  </code></pre>