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
44bc2714
Commit
44bc2714
authored
Sep 09, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
faa5eb46
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
SearchActivity.kt
...om/base/browserwhite/ui/activity/search/SearchActivity.kt
+2
-2
WebBrowserActivity.kt
...browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
+8
-6
No files found.
app/src/main/java/com/base/browserwhite/ui/activity/search/SearchActivity.kt
View file @
44bc2714
...
@@ -58,8 +58,8 @@ class SearchActivity : BaseActivity<ActivitySearchBinding>() {
...
@@ -58,8 +58,8 @@ class SearchActivity : BaseActivity<ActivitySearchBinding>() {
override
val
binding
:
ActivitySearchBinding
by
lazy
{
override
val
binding
:
ActivitySearchBinding
by
lazy
{
ActivitySearchBinding
.
inflate
(
layoutInflater
)
ActivitySearchBinding
.
inflate
(
layoutInflater
)
}
}
fun
closeIm
()
{
private
fun
closeIm
()
{
val
imm
=
getSystemService
(
INPUT_METHOD_SERVICE
)
as
InputMethodManager
val
imm
=
getSystemService
(
INPUT_METHOD_SERVICE
)
as
InputMethodManager
?
if
(
imm
!=
null
&&
currentFocus
!=
null
)
{
if
(
imm
!=
null
&&
currentFocus
!=
null
)
{
imm
.
hideSoftInputFromWindow
(
currentFocus
!!
.
windowToken
,
0
)
imm
.
hideSoftInputFromWindow
(
currentFocus
!!
.
windowToken
,
0
)
}
}
...
...
app/src/main/java/com/base/browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
View file @
44bc2714
...
@@ -374,10 +374,10 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
...
@@ -374,10 +374,10 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
}
}
binding
.
ivPageSearchClose
.
setOnClickListener
{
binding
.
ivPageSearchClose
.
setOnClickListener
{
binding
.
editPageSearch
.
setText
(
""
)
closeIm
()
binding
.
llPageSearch
.
visibility
=
View
.
GONE
binding
.
llPageSearch
.
visibility
=
View
.
GONE
binding
.
clBottom
.
visibility
=
View
.
VISIBLE
binding
.
clBottom
.
visibility
=
View
.
VISIBLE
closeIm
()
}
}
...
@@ -411,15 +411,17 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
...
@@ -411,15 +411,17 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
}
}
}
}
fun
closeIm
()
{
private
fun
closeIm
()
{
val
imm
=
getSystemService
(
INPUT_METHOD_SERVICE
)
as
InputMethodManager
val
imm
=
getSystemService
(
INPUT_METHOD_SERVICE
)
as
InputMethodManager
?
if
(
imm
!=
null
&&
currentFocus
!=
null
)
{
if
(
imm
!=
null
&&
currentFocus
!=
null
)
{
imm
.
hideSoftInputFromWindow
(
currentFocus
!!
.
windowToken
,
0
)
imm
.
hideSoftInputFromWindow
(
currentFocus
?.
windowToken
,
0
)
binding
.
editPageSearch
.
setText
(
""
)
}
}
}
}
@SuppressLint
(
"SetTextI18n"
)
fun
setSearchNum
(
int
:
Int
,
max
:
Int
)
{
fun
setSearchNum
(
int
:
Int
,
max
:
Int
)
{
binding
.
tvPageSearchNumber
.
text
=
"
"
+
int
+
"/"
+
max
binding
.
tvPageSearchNumber
.
text
=
"
$int/$max"
}
}
override
fun
onResume
()
{
override
fun
onResume
()
{
...
...
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