title: Horizontal Scroll View inside LinearLayout - Android
body: <p>I have a custom list. I am trying to scroll horizontally only specific part. For Instance, in the below image iam trying to scroll horizontally just the orange box. </p>
  
  <p><img src="https://i.stack.imgur.com/J61DU.png" alt="enter image description here"></p>
  
  <p>Here is my XML Layout: In the XML layout the Orange box starts "android:id="@+id/projected"</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:orientation="vertical" &gt;
  
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="63dp"
      android:layout_marginLeft="0dp"
      android:background="@drawable/bkg_img_fullcell"
      android:orientation="horizontal" &gt;
  
      &lt;!-- Left Column --&gt;
  
      &lt;LinearLayout
          android:id="@+id/widget_lineupview_playerdata_container"
          android:layout_width="wrap_content"
          android:layout_height="@dimen/widget_lineup_table_row_height"
          android:layout_toRightOf="@+id/sideView"
          android:gravity="center_vertical"
          android:layout_toLeftOf="@+id/projected"
          android:orientation="vertical" &gt;
  
          &lt;LinearLayout
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"
              android:weightSum="4" &gt;
  
              &lt;!-- rel 1 --&gt;
  
              &lt;LinearLayout
                  android:id="@+id/playername1"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="3"
                  android:layout_toRightOf="@+id/sideView"&gt;
  
                  &lt;com.cbssports.nflapp.ffb.MyTextViewBold
                      android:id="@+id/widget_lineupview_playerdata_playername"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:ellipsize="end"
                      android:inputType="text|textNoSuggestions"
                      android:layout_marginLeft="5dp"
                      android:maxLines="1"
                      android:text=""
                      android:textColor="#08233e"
                      android:textSize="15dp" /&gt;
  
  
              &lt;/LinearLayout&gt;
              &lt;!-- rel 2 --&gt;
  
              &lt;LinearLayout
                  android:id="@+id/widget_lineupview_playerdata_playerStatsIconContainer"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:layout_toRightOf="@+id/playername1"
                  android:orientation="horizontal" &gt;
  
                  &lt;ImageView
                      android:id="@+id/widget_lineupview_playerdata_statusIconSuspended"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_marginLeft="1dp"
                      android:src="@drawable/btn_s"
                      android:visibility="gone" /&gt;
              &lt;/LinearLayout&gt;
   &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"
              android:layout_toRightOf="@+id/sideView" &gt;
  
              &lt;TextView
                      android:id="@+id/widget_lineupview_playerdata_playerPositionTeam"
                      android:layout_marginLeft="5dp"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:ellipsize="end"
                      android:inputType="text|textNoSuggestions"
                      android:maxLines="1"
                      android:text=""
                      android:textColor="#333333"
                      android:textSize="12dp" /&gt;
  
  
              &lt;ImageView
                  android:id="@+id/widget_lineupview_playerdata_startingPitcherStatus"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="3dp"
                  android:layout_marginRight="3dp"
                  android:src="@drawable/btn_baseballgraphic"
                  android:visibility="gone" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:id="@+id/sideView"
          android:layout_width="@dimen/widget_lineup_table_status_column_width"
          android:layout_height="@dimen/widget_lineup_table_row_height"
          android:layout_alignParentLeft="true"
          android:background="@drawable/bkg_img_rosterpos"
          android:gravity="center" &gt;
  
          &lt;!-- &lt;Button --&gt;
          &lt;com.cbssports.nflapp.ffb.VerticalTextView
              android:id="@+id/widget_lineupview_playerdata_playerStatusButton"
              android:layout_width="21dp"
              android:layout_height="60dp"
              android:layout_margin="0dp"
              android:padding="0dp"
              android:textColor="#004a8e"
              android:textSize="11dp"
              android:textStyle="bold"
              android:gravity="bottom|center" /&gt;
      &lt;/LinearLayout&gt;
  ***&lt;LinearLayout
          android:id="@+id/projected"
          android:layout_width="wrap_content"
          android:layout_height="@dimen/widget_lineup_table_row_height"
          android:background="@drawable/bkg_img_whiteoverlay"
          android:layout_toLeftOf="@+id/percentStarted"&gt;
  
          &lt;TextView
              android:id="@+id/widget_lineupview_player_h2h_stats_started_custom"
              android:layout_width="50dp"
              android:layout_height="wrap_content"
              android:layout_centerInParent="true"
              android:gravity="center"
              android:textStyle="bold"
              android:textSize="16dp"
              android:textColor="#333333" /&gt;
      &lt;/LinearLayout&gt;
      &lt;LinearLayout
          android:id="@+id/percentStarted"
          android:layout_width="wrap_content"
          android:layout_height="@dimen/widget_lineup_table_row_height"
          android:background="@drawable/bkg_img_whiteoverlay"
           android:layout_alignParentRight="true"
           android:layout_marginLeft="2dp"&gt;
  
          &lt;TextView
              android:id="@+id/widget_lineupview_player_projected_custom"
              android:layout_width="50dp"
              android:layout_height="wrap_content"
              android:layout_centerInParent="true"
              android:gravity="center"
              android:textStyle="bold"
              android:textSize="16dp"
              android:textColor="#333333" /&gt;
      &lt;/LinearLayout&gt;***
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>