title: Checkbox buttons aren't responding properly when using a Scrollview to scroll through a large Imageview
body: <p>I am making an app that requires a large png image to be able to scroll with Checkbox buttons laid on top of the image that will scroll with it. I got help from this link <a href="https://stackoverflow.com/questions/31330633/scrollview-with-many-buttons-over-an-image">Scrollview with many buttons over an image</a>. Here is what I have so far.</p>
  
  <pre><code>&lt;ScrollView
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:id="@+id/svVertical"
      android:layout_below="@+id/buildingNameText"
      android:layout_alignParentStart="true"
      android:layout_marginBottom="60dp" &gt;
  
      &lt;HorizontalScrollView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/hsvHorizontal" &gt;
  
          &lt;RelativeLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:isScrollContainer="true"&gt;
  
              &lt;ImageView
                  android:id="@+id/map_view"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:src="@drawable/dummy_floor_extra_large"
                  android:scaleType="centerCrop"/&gt;
  
              &lt;CheckBox
                  android:layout_width="50dp"
                  android:layout_height="50dp"
                  android:id="@+id/checkBox"
                  android:button="@null"
                  android:background="?android:attr/listChoiceIndicatorMultiple"
                  android:layout_marginStart="21dp"
                  android:backgroundTint="#22e300"
                  android:layout_alignParentTop="true"
                  android:layout_alignParentStart="true"
                  android:layout_marginTop="15dp" /&gt;
  
              &lt;CheckBox
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:id="@+id/checkBox2"
                  android:layout_below="@+id/checkBox"
                  android:layout_alignStart="@+id/checkBox"
                  android:layout_marginStart="8dp"
                  android:buttonTint="#22e300" /&gt;
  
              &lt;RadioButton
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:id="@+id/radioButton"
                  android:layout_below="@+id/checkBox2"
                  android:layout_alignStart="@+id/checkBox2"
                  android:layout_marginTop="7dp"
                  android:buttonTint="#22e300" /&gt;
  
              &lt;RadioButton
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="New RadioButton"
                  android:id="@+id/radioButton2"
                  android:layout_below="@+id/radioButton"
                  android:layout_toEndOf="@+id/checkBox"
                  android:layout_marginStart="150dp"
                  android:layout_marginTop="58dp" /&gt;
  
              &lt;CheckBox
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="New CheckBox"
                  android:id="@+id/checkBox3"
                  android:layout_below="@+id/radioButton2"
                  android:layout_alignStart="@+id/radioButton2"
                  android:layout_marginTop="32dp" /&gt;
  
              &lt;Switch
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="New Switch"
                  android:id="@+id/switch1"
                  android:layout_below="@+id/checkBox3"
                  android:layout_alignStart="@+id/checkBox3"
                  android:layout_marginTop="42dp" /&gt;
  
              &lt;Switch
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:id="@+id/switch2"
                  android:layout_below="@+id/radioButton"
                  android:layout_marginTop="7dp"
                  android:layout_alignStart="@+id/radioButton" /&gt;
  
              &lt;Button
                  android:layout_width="50dp"
                  android:layout_height="45dp"
                  android:id="@+id/button"
                  android:layout_above="@+id/checkBox3"
                  android:layout_toStartOf="@+id/radioButton2" /&gt;
  
          &lt;/RelativeLayout&gt;
      &lt;/HorizontalScrollView&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>And here's the activity:</p>
  
  <pre><code>private ScrollView scrollY;
  private HorizontalScrollView scrollYChild;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_floor_view);
  
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.LOLLIPOP) {
          Window window = getWindow();
          window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
          window.setStatusBarColor(Color.parseColor("#505050"));
      }
  
      scrollY = (ScrollView) findViewById(R.id.svVertical);
      scrollYChild = (HorizontalScrollView) findViewById(R.id.hsvHorizontal);
  }
  
  
  @Override
  public boolean dispatchTouchEvent(MotionEvent event) {
      scrollYChild.dispatchTouchEvent(event);
      scrollY.onTouchEvent(event);
      return true;
  }
  </code></pre>
  
  <p>The problem is the checkboxes aren't clicking properly. As a matter of fact, all the buttons aren't working. I put all those buttons in the xml file for test purposes to see which one works and the only one that works is the switches. All the rest don't work properly but I would really prefer checkboxes rather than switches in my app. Any help is appreciated! Thank you.</p>