This article analyzes the solution to the automatic pop-up of Android keyboards. Share it for your reference, as follows:
1. In:
Copy the codeThe code is as follows:
activity android:name=".Uninstaller" android:label="@string/app_name" android:windowSoftInputMode="adjustPan"
Joined:
Copy the codeThe code is as follows:
android:windowSoftInputMode="adjustPan"
The soft keyboard will not pop up automatically.PS: This method can hide the keyboard, but the interface cannot be scrolled, even if scrolllayout is used in the layout.
2. It is to shift the focus to other components, such as to Button
(true); (true); (); ();
PS: This method is reliable.
3. (This method is not possible at all)
The buttons in the AlertDialog custom view. When clicked, you want to hide AlertDialog, but find that it is not possible. You can only use the three buttons that come with AlertDialog to disappear.
//ProgressDialog with Cancel buttondownloadDialog = new ProgressDialog(context); (false);//The back key does not work. If true, press the back key, the ProgressDialog will disappear("Downloading the installation package..."); ("Cancel", new () { public void onClick(DialogInterface dialog, int i) { (); downApkCancel = true; } });
I hope this article will be helpful to everyone's Android programming design.