I needed to make a vertical switch , I don’t find anything on the Internet, at least I didn’t find it, there are options with ToggleButton and ImageButton , but this doesn’t suit me very much, because switching only when pressed, the implementation via OnTouchListener also not very suitable.
In general, can there be a library with which you can implement a vertical switch ?

Switchalready reacts to the swipe (it can be moved with a finger), what makes you think that this will not work? Although in your case you still need to redefine theonTouch()method so that it reacts to vertical, not horizontal svayp (specifically, the TOUCH_MODE_DRAGGING case andonDraw()logic, yet to customize the switch itself) . There is probably no ready solution, you need to make your own class - pavlofff