In my mainactivity, I have several radiobuttons (2 groups), a 'go' button and on the bottom of the screen an EditText field.
When a user selects the EditText field, the keyboard pops up. The first thing I want is that the 'go' button remains and that the 2 radiogroups containing multiple radiobuttons disappear. That way, the screen layout remains as simple as possible.
Also, when the user cancels the EditText input (pressing back button on device), I would like the MainActivity (screen with all buttons and the edittextfield) to reappear.
The first part works when I setVisibility of the RadioGroups to View.INVISIBLE within the onClick listener of the EditText field.
However, when a user cancels input in the EditText field (keyboard disappears) the layout remains in that specific view: only the 'go' button & edittextfield are visible on the screen.
How can I handle the cancel/back button of the device when using an EditText field and make it restart an activity or reappear previously hidden layout elements?