0

My app creates most of its UI at runtime depending on the user's saved document. It contains GridLayouts and because we don't know their size, they are contained within HorizontalScrollViews. It also has multiple pages, so this is all within a ViewPager. The HorizontalScrollViews inside the ViewPager have caused a few issues but work mostly OK.

One of the data elements is displayed as a ToggleButton. I'd much rather use the Switch for this but I've found that any Switch ending up inside a HorizontalScrollView ceases to work i.e. it cannot be moved from one position to another. Having the switch inside the ViewPager doesn't seem to matter.

So my question is, how can I include working Switches within a HorizontalScrollView? Is this even possible?

1 Answers1

0

There is a requestDisallowInterceptTouchEvent() handle that is sometimes used to gain priviledge over another view. One other individual with something similar can be seen posted here if this is of help on two ways to approach it that should work.

Increasing touch priority of a SeekBar

Community
  • 1
  • 1
Jay Snayder
  • 4,298
  • 4
  • 27
  • 53