Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
polysoft-nafmii
/
polysoft-android
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1decc8eb
authored
Oct 18, 2021
by
amateur
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
8f961a6c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
app/src/main/java/com/whaty/nafmii/activity/WebviewActivity.java
app/src/main/java/com/whaty/nafmii/activity/WebviewActivity.java
View file @
1decc8e
...
...
@@ -3,6 +3,7 @@ package com.whaty.nafmii.activity;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.inputmethod.InputMethodManager
;
import
androidx.annotation.Nullable
;
...
...
@@ -29,8 +30,11 @@ public abstract class WebviewActivity extends BaseActivity {
protected
void
onPause
()
{
super
.
onPause
();
InputMethodManager
input
=
(
InputMethodManager
)
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
if
(
null
!=
input
&&
input
.
isActive
())
{
input
.
toggleSoftInput
(
InputMethodManager
.
SHOW_IMPLICIT
,
InputMethodManager
.
HIDE_NOT_ALWAYS
);
if
(
null
!=
input
)
{
View
view
=
getWindow
().
peekDecorView
();
if
(
null
!=
view
)
{
input
.
hideSoftInputFromWindow
(
view
.
getWindowToken
(),
0
);
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment