Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
B
Browser White
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Browser White
Commits
88f0dbc2
Commit
88f0dbc2
authored
Sep 06, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收起软键盘
parent
bde02d1b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
SearchActivity.kt
...om/base/browserwhite/ui/activity/search/SearchActivity.kt
+7
-1
WebBrowserActivity.kt
...browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
+6
-6
No files found.
app/src/main/java/com/base/browserwhite/ui/activity/search/SearchActivity.kt
View file @
88f0dbc2
...
...
@@ -58,8 +58,14 @@ class SearchActivity : BaseActivity<ActivitySearchBinding>() {
override
val
binding
:
ActivitySearchBinding
by
lazy
{
ActivitySearchBinding
.
inflate
(
layoutInflater
)
}
fun
closeIm
()
{
val
imm
=
getSystemService
(
INPUT_METHOD_SERVICE
)
as
InputMethodManager
if
(
imm
!=
null
&&
currentFocus
!=
null
)
{
imm
.
hideSoftInputFromWindow
(
currentFocus
!!
.
windowToken
,
0
)
}
}
private
fun
searchJump
(
content
:
String
)
{
closeIm
()
var
link
=
""
LinkSearchUtils
.
handleInput
(
content
,
loadUrl
=
{
link
=
it
...
...
app/src/main/java/com/base/browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
View file @
88f0dbc2
...
...
@@ -4,6 +4,7 @@ package com.base.browserwhite.ui.activity.webbrowser
import
android.animation.AnimatorSet
import
android.animation.ObjectAnimator
import
android.annotation.SuppressLint
import
android.content.Context
import
android.content.Intent
import
android.graphics.Color
import
android.text.Editable
...
...
@@ -375,9 +376,10 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
binding
.
ivPageSearchClose
.
setOnClickListener
{
binding
.
editPageSearch
.
setText
(
""
)
binding
.
editPageSearch
.
clearFocus
()
binding
.
llPageSearch
.
visibility
=
View
.
GONE
binding
.
clBottom
.
visibility
=
View
.
VISIBLE
closeIm
(
)
hideKeyboard
(
this
,
binding
.
editPageSearch
)
}
...
...
@@ -410,11 +412,9 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
}
}
}
fun
closeIm
()
{
val
imm
=
getSystemService
(
INPUT_METHOD_SERVICE
)
as
InputMethodManager
if
(
imm
!=
null
&&
currentFocus
!=
null
)
{
imm
.
hideSoftInputFromWindow
(
currentFocus
!!
.
windowToken
,
0
)
}
fun
hideKeyboard
(
context
:
Context
,
view
:
View
)
{
val
imm
=
context
.
getSystemService
(
INPUT_METHOD_SERVICE
)
as
InputMethodManager
imm
?.
hideSoftInputFromWindow
(
view
.
windowToken
,
0
)
}
fun
setSearchNum
(
int
:
Int
,
max
:
Int
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment