If you often use radiogroup during the development process, have you ever encountered the following situation
Whenever you click EditText Pop-up Input method, Radiogroup always move up to the input method above.
You might think that you need to add the following attribute to Radiogroup:
Android:layout_alignparentbottom= "true"
But when you open the XML file, it's embarrassing to find that the attribute has been added, how to solve the small bug?
In fact, simply AndroidManifest.xml
add a property to the registration information for the current class in the file:
Android:windowsoftinputmode= "Adjustnothing"
The wording is as follows:
<activity
android:name= ". Activity. Mainactivity "
android:windowsoftinputmode=" adjustnothing "/>
Or add in the method of the activity onCreate()
:
This.getwindow (). Setsoftinputmode (WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
Here is the effect chart:
You may have to ask why adding this code will solve the problem, and that's about the windowSoftInputMode
attribute.
First of all, from the name of this attribute, we can see how it works, this property is to set the window soft keyboard interactive mode.
Windowsoftinputmode has the following 10 values to choose from:
1.adjustNothing: window does not adjust
2.adjustPan: The contents of the current window will automatically move so that the current focus is never covered by the keyboard and the user can always see the input (the soft keyboard will block the screen)
3.adjustResize: The activity always adjusts the size of the screen to allow for soft keyboard space (you can display all screens)
4.adjustUnspecified: default settings, usually determined by the system to hide or show
5.stateAlwaysHidden: When the Activity main window gets the focus, the soft keyboard is always hidden
6.stateAlwaysVisible: When the user chooses the activity, the soft keyboard always shows the state
7.stateHidden: When the user chooses the activity, the soft keyboard is always hidden
8.stateUnchanged: 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 choose a suitable state or dependent on the theme of the settings
10.stateVisible: The soft keyboard is usually visible
Summarize
The above is in the Android solution Radiogroup display in the Input Method window above the whole content of the problem, everybody learned? I hope this article for everyone to learn about Android Help, the problem of small partners can leave a message to discuss.