Fix bug when cancelling gesture menu with second finger touch.
Use XML for study setup dialog.