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
d26ef805
Commit
d26ef805
authored
Sep 06, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
e2c14a91
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
41 deletions
+43
-41
SearchActivity.kt
...om/base/browserwhite/ui/activity/search/SearchActivity.kt
+0
-5
WebBrowserActivity.kt
...browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
+28
-22
activity_web_browser.xml
app/src/main/res/layout/activity_web_browser.xml
+15
-14
No files found.
app/src/main/java/com/base/browserwhite/ui/activity/search/SearchActivity.kt
View file @
d26ef805
...
...
@@ -5,15 +5,10 @@ import android.animation.AnimatorSet
import
android.animation.ObjectAnimator
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.content.Context
import
android.content.Intent
import
android.content.res.Resources
import
android.graphics.Color
import
android.os.Handler
import
android.text.TextUtils
import
android.util.DisplayMetrics
import
android.util.Log
import
android.util.TypedValue
import
android.view.KeyEvent
import
android.view.View
import
android.view.inputmethod.EditorInfo
...
...
app/src/main/java/com/base/browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
View file @
d26ef805
...
...
@@ -372,28 +372,31 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
)
}
// binding.ivPageSearchClose.setOnClickListener {
// binding.editPageSearch.setText("")
// binding.llPageSearch.visibility = View.GONE
// binding.clBottom.visibility = View.VISIBLE
// }
// binding.editPageSearch.addTextChangedListener(object : TextWatcher {
// override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
//
// }
//
// override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
// }
//
// override fun afterTextChanged(s: Editable?) {
// val key = s.toString()
// if (currentFragment != null) {
// currentFragment?.findAll(key)
// }
//
// }
// })
binding
.
ivPageSearchClose
.
setOnClickListener
{
binding
.
editPageSearch
.
setText
(
""
)
binding
.
llPageSearch
.
visibility
=
View
.
GONE
binding
.
clBottom
.
visibility
=
View
.
VISIBLE
closeIm
()
}
binding
.
editPageSearch
.
addTextChangedListener
(
object
:
TextWatcher
{
override
fun
beforeTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
count
:
Int
,
after
:
Int
)
{
}
override
fun
onTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
before
:
Int
,
count
:
Int
)
{
}
override
fun
afterTextChanged
(
s
:
Editable
?)
{
val
key
=
s
.
toString
()
if
(
currentFragment
!=
null
)
{
currentFragment
?.
findAll
(
key
)
}
}
})
binding
.
ivLeftSearch
.
setOnClickListener
{
if
(
currentFragment
!=
null
)
{
...
...
@@ -406,6 +409,9 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
}
}
}
fun
closeIm
()
{
}
fun
setSearchNum
(
int
:
Int
,
max
:
Int
)
{
binding
.
tvPageSearchNumber
.
text
=
""
+
int
+
"/"
+
max
...
...
app/src/main/res/layout/activity_web_browser.xml
View file @
d26ef805
...
...
@@ -3,6 +3,7 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/main"
android:fitsSystemWindows=
"true"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
...
...
@@ -217,20 +218,20 @@
android:background=
"@drawable/bg_storke_070709_20"
android:orientation=
"horizontal"
>
<!-- <EditText-->
<!-- android:id="@+id/edit_page_search"-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center_vertical"-->
<!-- android:layout_marginHorizontal="15dp"-->
<!-- android:layout_weight="1"-->
<!-- android:background="@null"-->
<!-- android:drawableStart="@mipmap/sousuoicon_page_search"-->
<!-- android:drawablePadding="5dp"-->
<!-- android:hint="Search"-->
<!-- android:singleLine="true"-->
<!-- android:textSize="16sp"-->
<!-- tools:ignore="Autofill,HardcodedText,NestedWeights,TextFields" />--
>
<EditText
android:id=
"@+id/edit_page_search"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginHorizontal=
"15dp"
android:layout_weight=
"1"
android:background=
"@null"
android:drawableStart=
"@mipmap/sousuoicon_page_search"
android:drawablePadding=
"5dp"
android:hint=
"Search"
android:singleLine=
"true"
android:textSize=
"16sp"
tools:ignore=
"Autofill,HardcodedText,NestedWeights,TextFields"
/
>
<TextView
android:id=
"@+id/tv_page_search_number"
...
...
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