Commit 1decc8eb by amateur

1

1 parent 8f961a6c
...@@ -3,6 +3,7 @@ package com.whaty.nafmii.activity; ...@@ -3,6 +3,7 @@ package com.whaty.nafmii.activity;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.View;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
...@@ -29,8 +30,11 @@ public abstract class WebviewActivity extends BaseActivity { ...@@ -29,8 +30,11 @@ public abstract class WebviewActivity extends BaseActivity {
protected void onPause() { protected void onPause() {
super.onPause(); super.onPause();
InputMethodManager input = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); InputMethodManager input = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if (null != input && input.isActive()) { if (null != input) {
input.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, InputMethodManager.HIDE_NOT_ALWAYS); View view = getWindow().peekDecorView();
if (null != view) {
input.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
} }
} }
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!