Home >Java >javaTutorial >Interface control method when Android soft keyboard pops up
The example in this article describes the interface control method when the Android soft keyboard pops up. Share it with everyone for your reference, the details are as follows:
Sometimes the layout changes after the soft keyboard pops up in androidactivity
There are three modes below to change the display form of the soft keyboard after popping up
Mode 1: Compression mode After the soft keyboard pops up, it will be compressed to the original size
We can set the Activity in AndroidManifet.xml. Such as:
android:windowSoftInputMode="stateUnchanged|adjustResize"
Mode 2: Panning mode After the soft keyboard pops up, it will not compress the original size, but overwrite it
We can set the Activity in AndroidManifet.xml. For example:
android:windowSoftInputMode="stateUnchanged|adjustPan"
Mode 3: Automatic mode The system automatically decides whether to use translation mode or compression mode. The deciding factor is whether the content can be scrolled.
android:windowSoftInputMode="adjustUspecified"
PS: Here is another online query tool for AndroidManifest.xml permission control:
I hope this article will be helpful to everyone’s Android programming design. .
For more articles related to the interface control method when the Android soft keyboard pops up, please pay attention to the PHP Chinese website!