|
@@ -2,12 +2,17 @@ package com.example.informationkanban.dialog;
|
|
|
|
|
|
import android.app.Activity;
|
|
|
import android.app.AlertDialog;
|
|
|
+import android.content.Context;
|
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
+import android.view.Window;
|
|
|
+import android.view.WindowManager;
|
|
|
+import android.view.inputmethod.InputMethodManager;
|
|
|
import android.widget.Button;
|
|
|
import android.widget.EditText;
|
|
|
|
|
|
import com.example.informationkanban.R;
|
|
|
+import com.example.informationkanban.utils.AppUtil;
|
|
|
import com.example.informationkanban.utils.NetFunctionConfig;
|
|
|
|
|
|
public class UrlConfigDialogHelper {
|
|
@@ -40,11 +45,29 @@ public class UrlConfigDialogHelper {
|
|
|
if (alertDialog != null) {
|
|
|
alertDialog.dismiss();
|
|
|
}
|
|
|
+
|
|
|
+ AppUtil.restartApp(activity);
|
|
|
});
|
|
|
|
|
|
alertDialog = builder.create();
|
|
|
- alertDialog.setCanceledOnTouchOutside(true);
|
|
|
- alertDialog.setCancelable(true);
|
|
|
+ alertDialog.setCanceledOnTouchOutside(false);
|
|
|
+ alertDialog.setCancelable(false);
|
|
|
alertDialog.show();
|
|
|
+
|
|
|
+ try {
|
|
|
+ //默认隐藏软键盘
|
|
|
+ AppUtil.hideInputKeyboard(activity, alertDialog.getWindow().getDecorView().getWindowToken());
|
|
|
+
|
|
|
+ Window window = alertDialog.getWindow();
|
|
|
+ window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
|
|
+ | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
|
|
+ | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
|
|
+ | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
|
|
+ | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
|
|
+ | View.SYSTEM_UI_FLAG_FULLSCREEN);
|
|
|
+ window.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
|
|
|
+ } catch (Exception e) {
|
|
|
+ //
|
|
|
+ }
|
|
|
}
|
|
|
}
|