Prevent keyboard from showing up in open link dialog

This commit is contained in:
M66B 2020-04-30 11:37:05 +02:00
parent ddd68ab645
commit 3d2572cf7a
1 changed files with 5 additions and 0 deletions

View File

@ -90,6 +90,7 @@ import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.AccelerateDecelerateInterpolator; import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.inputmethod.InputMethodManager;
import android.view.textclassifier.ConversationAction; import android.view.textclassifier.ConversationAction;
import android.view.textclassifier.ConversationActions; import android.view.textclassifier.ConversationActions;
import android.view.textclassifier.TextClassificationManager; import android.view.textclassifier.TextClassificationManager;
@ -5470,6 +5471,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
final Context context = getContext(); final Context context = getContext();
etLink.clearFocus();
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(etLink.getWindowToken(), 0);
return new AlertDialog.Builder(context) return new AlertDialog.Builder(context)
.setView(dview) .setView(dview)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {