Como Dividir Tu Pantalla En Dos Windows 10

It actually can be done with listeners but with an OnTouchListener, which will trigger before the button's state has changed, instead of the usual OnClickListener. The following works for me: