title: Scrollview in a HorizontalScrollView and that in a ViewPager
body: <p>I want to make a week view that is both horizontally and vertically scroll able. once it reaches the horizontal end of the view it should change the page of the viewPager.
  So far, I have added a ScrollView in a HorizontalScrollView and inflated the Weekview in a viewpage, and that's where the problem occurs, nor the Horizontal scrollView works correctly, neither the view pager.</p>
  
  <p><a href="https://i.stack.imgur.com/YtvJ4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YtvJ4.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
      &lt;HorizontalScrollView
          android:id ="@+id/week_list"
          android:layout_width="match_parent"
          android:layout_marginLeft="@dimen/_60sdp"
          android:layout_height="@dimen/_40sdp"
          android:scrollbars="none"&gt;
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal"&gt;
              &lt;LinearLayout
                  android:layout_width="@dimen/_100sdp"
                  android:layout_height="match_parent"
                  &gt;
                  &lt;TextView
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:text="Monday"
                      android:layout_gravity="center"
                      android:gravity="center"/&gt;
              &lt;/LinearLayout&gt;
              &lt;LinearLayout
                  android:layout_width="@dimen/_100sdp"
                  android:layout_height="match_parent"
                  &gt;
                  &lt;TextView
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:text="Tuesday"
                      android:layout_gravity="center"
                      android:gravity="center"/&gt;
              &lt;/LinearLayout&gt;
              &lt;LinearLayout
                  android:layout_width="@dimen/_100sdp"
                  android:layout_height="match_parent"
                  &gt;
                  &lt;TextView
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:text="Wednesday"
                      android:layout_gravity="center"
                      android:gravity="center"/&gt;
              &lt;/LinearLayout&gt;
              &lt;LinearLayout
                  android:layout_width="@dimen/_100sdp"
                  android:layout_height="match_parent"
                  &gt;
                  &lt;TextView
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:text="Thursday"
                      android:layout_gravity="center"
                      android:gravity="center"/&gt;
              &lt;/LinearLayout&gt;
              &lt;LinearLayout
                  android:layout_width="@dimen/_100sdp"
                  android:layout_height="match_parent"
                  &gt;
                  &lt;TextView
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:text="Friday"
                      android:layout_gravity="center"
                      android:gravity="center"/&gt;
              &lt;/LinearLayout&gt;
              &lt;LinearLayout
                  android:layout_width="@dimen/_100sdp"
                  android:layout_height="match_parent"
                  &gt;
                  &lt;TextView
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:text="Saturday"
                      android:layout_gravity="center"
                      android:gravity="center"/&gt;
              &lt;/LinearLayout&gt;
              &lt;LinearLayout
                  android:layout_width="@dimen/_100sdp"
                  android:layout_height="match_parent"
                  &gt;
                  &lt;TextView
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:text="Sunday"
                      android:layout_gravity="center"
                      android:gravity="center"/&gt;
              &lt;/LinearLayout&gt;
          &lt;/LinearLayout&gt;
      &lt;/HorizontalScrollView&gt;
      &lt;ScrollView
          android:id ="@+id/timing_list"
          android:layout_width="@dimen/_60sdp"
          android:layout_marginTop="@dimen/_40sdp"
          android:layout_marginBottom="0dp"
          android:paddingBottom="0dp"
          android:layout_height="wrap_content"
          android:transcriptMode="alwaysScroll"
          android:scrollbars="none"
          &gt;
          &lt;LinearLayout
              android:id="@+id/timingLayout"
              android:layout_width="@dimen/_60sdp"
              android:layout_height="wrap_content"
              android:orientation="vertical"/&gt;
      &lt;/ScrollView&gt;
  
      &lt;com.fibodo.widget.HorizontalScrolllView
          android:id="@+id/horizontalScrolllView"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_below="@+id/week_list"
          android:layout_toRightOf="@+id/timing_list"
          android:focusable="true"
          android:scrollbars="none"&gt;
          &lt;com.fibodo.widget.ScrolllView
              android:id="@+id/scrolllView"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:scrollbars="none"&gt;
              &lt;LinearLayout
                  android:layout_height="wrap_content"
                  android:layout_width="wrap_content"
                  android:orientation="horizontal"&gt;
                  &lt;LinearLayout
                      android:id="@+id/mondaylayout"
                      android:layout_width="0dp"
                      android:layout_height="match_parent"
                      android:layout_weight="1"
                      android:layout_marginLeft="0dp"
                      android:layout_marginRight="0dp"
                      android:paddingRight="0dp"
                      android:paddingLeft="0dp"
                      android:orientation="vertical"&gt;
  
                  &lt;/LinearLayout&gt;
                  &lt;LinearLayout
                      android:id="@+id/tuesdaylayout"
                      android:layout_width="0dp"
                      android:layout_height="match_parent"
                      android:layout_weight="1"
                      android:layout_marginLeft="0dp"
                      android:layout_marginRight="0dp"
                      android:paddingRight="0dp"
                      android:paddingLeft="0dp"
                      android:orientation="vertical"&gt;
  
                  &lt;/LinearLayout&gt;
                  &lt;LinearLayout
                      android:id="@+id/wednesdaylayout"
                      android:layout_width="0dp"
                      android:layout_height="match_parent"
                      android:layout_weight="1"
                      android:layout_marginLeft="0dp"
                      android:layout_marginRight="0dp"
                      android:paddingRight="0dp"
                      android:paddingLeft="0dp"
                      android:orientation="vertical"&gt;
  
                  &lt;/LinearLayout&gt;
                  &lt;LinearLayout
                      android:id="@+id/thursdaylayout"
                      android:layout_width="0dp"
                      android:layout_height="match_parent"
                      android:layout_weight="1"
                      android:layout_marginLeft="0dp"
                      android:layout_marginRight="0dp"
                      android:paddingRight="0dp"
                      android:paddingLeft="0dp"
                      android:orientation="vertical"&gt;
  
                  &lt;/LinearLayout&gt;
                  &lt;LinearLayout
                      android:id="@+id/fridaylayout"
                      android:layout_width="0dp"
                      android:layout_height="match_parent"
                      android:layout_weight="1"
                      android:layout_marginLeft="0dp"
                      android:layout_marginRight="0dp"
                      android:paddingRight="0dp"
                      android:paddingLeft="0dp"
                      android:orientation="vertical"&gt;
  
                  &lt;/LinearLayout&gt;
                  &lt;LinearLayout
                      android:id="@+id/saturdaylayout"
                      android:layout_width="0dp"
                      android:layout_height="match_parent"
                      android:layout_weight="1"
                      android:layout_marginLeft="0dp"
                      android:layout_marginRight="0dp"
                      android:paddingRight="0dp"
                      android:paddingLeft="0dp"
                      android:orientation="vertical"&gt;
  
                  &lt;/LinearLayout&gt;
                  &lt;LinearLayout
                      android:id="@+id/sundaylayout"
                      android:layout_width="0dp"
                      android:layout_height="match_parent"
                      android:layout_weight="1"
                      android:layout_marginLeft="0dp"
                      android:layout_marginRight="0dp"
                      android:paddingRight="0dp"
                      android:paddingLeft="0dp"
                      android:orientation="vertical"&gt;
  
                  &lt;/LinearLayout&gt;
              &lt;/LinearLayout&gt;
          &lt;/com.fibodo.widget.ScrolllView&gt;
      &lt;/com.fibodo.widget.HorizontalScrolllView&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I want to inflate this layout in viewpager</p>