Home > Java > javaTutorial > body text

Interface control method when Android soft keyboard pops up

高洛峰
Release: 2017-01-07 11:42:12
Original
1478 people have browsed it

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"
Copy after login

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"
Copy after login

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"
Copy after login

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!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template