0
0
mirror of https://github.com/TrianguloY/UrlChecker.git synced 2024-09-19 20:02:16 +02:00

make keyboard don't hide the dialog content

This commit is contained in:
TrianguloY 2023-04-23 12:22:38 +02:00
parent 03ab4b6ca5
commit 190db4f593
5 changed files with 13 additions and 0 deletions

View File

@ -29,6 +29,7 @@
android:name=".dialogs.MainDialog"
android:exported="true"
android:noHistory="true"
android:windowSoftInputMode="adjustResize|stateHidden"
android:theme="@android:style/Theme.DeviceDefault.Dialog">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

View File

@ -3,6 +3,7 @@ package com.trianguloy.urlchecker.dialogs;
import android.app.Activity;
import android.app.AlertDialog;
import android.view.View;
import android.view.WindowManager;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
@ -57,6 +58,8 @@ public class JsonEditor {
.setCancelable(false)
.show();
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
// prepare more dialog
// these are configured here to disable automatic auto-closing when they are pressed
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(v -> {

View File

@ -5,6 +5,7 @@ import android.app.AlertDialog;
import android.util.Log;
import android.util.Pair;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
@ -223,6 +224,8 @@ public class ClearUrlCatalog {
.setCancelable(true)
.show();
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
// prepare more dialog
// these are configured here to allow auto-closing the dialog when they are pressed
Button updateNow = dialog.getButton(AlertDialog.BUTTON_POSITIVE);

View File

@ -8,6 +8,7 @@ import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.CompoundButton;
@ -412,6 +413,8 @@ class FlagsConfig extends AModuleConfig {
.setNeutralButton(views.getContext().getText(R.string.reset), null)
.show();
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(listener -> {
// Save the settings
storePreferences(box, file, "default");

View File

@ -4,6 +4,7 @@ import android.app.AlertDialog;
import android.content.Context;
import android.text.util.Linkify;
import android.view.View;
import android.view.WindowManager;
import android.widget.EditText;
import android.widget.ScrollView;
import android.widget.TextView;
@ -138,6 +139,8 @@ class LogConfig extends AModuleConfig {
// show
AlertDialog dialog = builder.show();
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
// prepare more dialog
// these are configured here to disable automatic auto-closing when they are pressed
if (editable) {