Solve the problem of Android radiogroup running on the input method
During Android development, we found a small problem. When we click the input box at the bottom of the screen, our radiogroup will run to the top of the input method, as shown in the figure below
Two solutions
1. The manifest.xml file is added to the activity tag
2. Add in oncreate method
3. Either of the above two can be solved perfectly
Method interpretation
As the name suggests, windowsoftinputmode is a window soft input mode. Its method has 10 attributes, as follows:
1. Adjustnothing: the window is not adjusted
2. Adjustpan: the content of the current window will move automatically so that the current focus is never covered by the keyboard and the user can always see the part of the input content (the soft keyboard will block the screen)
3. Adjustresize: the activity always adjusts the screen size to allow space for the soft keyboard (all screens can be displayed)
4. Adjustunspecified: default setting. The system usually decides whether to hide or display
5. Statealwaysshidden: when the activity main window gets the focus, the soft keyboard is always hidden
6. Statealwaysvisible: when the user selects activity, the soft keyboard always displays the status
7. Statehidden: when the user selects activity, the soft keyboard is always hidden
8. State unchanged: when this activity appears, the soft keyboard will remain in the state of the previous activity, whether hidden or displayed
9. Sstateunspecified: the status of the soft keyboard is not specified. The system will select an appropriate status or subject dependent settings
10. Statevisible: the soft keyboard is usually visible
So did you learn to waste?