title: Vertical Scroll bar with Horizontal Scroll Android
body: <p>Running into "unable to scroll" issues</p>
  
  <ul>
  <li>I am trying to get a customized vertical scrollbar working with the ability to scroll horizontally. </li>
  <li>I am trying to put 7 vertical scrollbars (@+id/verticalSeekbar, @+id/verticalSeekbar_2 etc.) in a horizontal scrollbar. </li>
  <li>I am (with the help of stackoverflow) able to get my custom vertical scrollbar. </li>
  </ul>
  
  <p>However, I am unable to scroll through it horizontally. I want to be able to scroll horizontally but it just doesn't work. Attached is the image of how I want it to be.
  Here is my code for <code>Activity_vertical_slider</code></p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;com.example.verticalsliderandroid.HScroll android:id="@+id/hScroll"
              android:layout_width="400dp" android:layout_height="wrap_content"&gt;
  
          &lt;RelativeLayout
              android:id="@+id/relative_layout_sample"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"
              &gt;
  
          &lt;com.example.verticalsliderandroid.VerticalSeekBar
          android:id="@+id/verticalSeekbar"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:layout_alignParentLeft="true"
          android:layout_centerVertical="true"
          android:max="255"
          android:progress="10"
          android:rotation="180"
          android:progressDrawable="@android:color/transparent"
          android:thumb="@drawable/eco_seekbar" /&gt;
  
          &lt;com.example.verticalsliderandroid.VerticalSeekBar
              android:id="@+id/verticalSeekbar_2"
              android:layout_width="wrap_content"
              android:layout_height="fill_parent"
              android:layout_alignParentTop="true"
              android:layout_toRightOf="@+id/verticalSeekbar"
              android:max="255"
              android:progress="10"
              android:progressDrawable="@android:color/transparent"
              android:rotation="180"
              android:thumb="@drawable/eco_seekbar" /&gt;    
  
          &lt;/RelativeLayout&gt;
  
      &lt;/com.example.verticalsliderandroid.HScroll&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Here is my <code>verticalseekbar.java</code></p>
  
  <pre><code>public class VerticalSeekBar extends SeekBar {
  
      public VerticalSeekBar(Context context) {
          super(context);
      }
  
      public VerticalSeekBar(Context context, AttributeSet attrs, int defStyle) {
  
          super(context, attrs, defStyle);
      }
  
      public VerticalSeekBar(Context context, AttributeSet attrs) {
  
          super(context, attrs);
      }
  
  
      protected void onSizeChanged(int w, int h, int oldw, int oldh) {
          super.onSizeChanged(h, w, oldh, oldw);
      }
  
      @Override
      protected synchronized void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
          super.onMeasure(heightMeasureSpec, widthMeasureSpec);
          setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth());
  
      }
  
      protected void onDraw(Canvas c) {
          c.rotate(-90);
          c.translate(-getHeight(), 0);
          super.onDraw(c);
      }
  
      @Override
      public boolean onTouchEvent(MotionEvent event) {
          if (!isEnabled()) {
              return false;
          }
  
          switch (event.getAction()) {
              case MotionEvent.ACTION_DOWN:
  
  
              case MotionEvent.ACTION_MOVE:
  
  
              case MotionEvent.ACTION_UP:
                  setProgress(getMax() - (int) (getMax() * event.getY() / getHeight()));
                  onSizeChanged(getWidth(), getHeight(), 0, 0);
                  break;
              case MotionEvent.ACTION_CANCEL:
                 break;
          }
          return true;
      }
  
  } 
  </code></pre>
  
  <p>I have searched enough on the internet. Just not getting what I need. Please help.</p>
  
  <p><img src="https://i.stack.imgur.com/vEd5S.png" alt="enter image description here"></p>