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
f1dbcbd0
Commit
f1dbcbd0
authored
Sep 04, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
515d226d
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
131 additions
and
103 deletions
+131
-103
HistoryAdapter.kt
.../base/browserwhite/ui/activity/bookmark/HistoryAdapter.kt
+7
-2
HistoryFragment.kt
...base/browserwhite/ui/activity/bookmark/HistoryFragment.kt
+2
-1
SearchActivity.kt
...om/base/browserwhite/ui/activity/search/SearchActivity.kt
+5
-4
WebBrowserActivity.kt
...browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
+3
-0
activity_search.xml
app/src/main/res/layout/activity_search.xml
+4
-4
activity_web_browser.xml
app/src/main/res/layout/activity_web_browser.xml
+6
-5
dialog_more_webbrowser.xml
app/src/main/res/layout/dialog_more_webbrowser.xml
+14
-9
fragment_home.xml
app/src/main/res/layout/fragment_home.xml
+3
-3
item_bookmark_history.xml
app/src/main/res/layout/item_bookmark_history.xml
+87
-75
xuanze.png
app/src/main/res/mipmap-xxhdpi/xuanze.png
+0
-0
No files found.
app/src/main/java/com/base/browserwhite/ui/activity/bookmark/HistoryAdapter.kt
View file @
f1dbcbd0
...
...
@@ -25,11 +25,16 @@ class HistoryAdapter : BaseQuickAdapter<HistoryBean, HistoryAdapter.HistoryViewH
if
(
item
==
null
)
return
val
binding
=
ItemBookmarkHistoryBinding
.
bind
(
holder
.
itemView
)
binding
.
flTime
.
isVisible
=
item
.
showTime
binding
.
llTime
.
isVisible
=
item
.
showTime
runCatching
{
if
(
binding
.
llTime
.
isVisible
)
{
binding
.
vFenge
.
isVisible
=
item
!=
items
.
first
()
}
}
if
(
System
.
currentTimeMillis
().
toFormatTime
()
==
item
.
time
.
toFormatTime
())
{
binding
.
tvTime
.
text
=
"Today"
}
else
{
binding
.
tvTime
.
text
=
item
.
time
.
toFormatTime
()
}
...
...
app/src/main/java/com/base/browserwhite/ui/activity/bookmark/HistoryFragment.kt
View file @
f1dbcbd0
...
...
@@ -86,6 +86,7 @@ class HistoryFragment : BaseFragment<FragmentHistoryBinding>() {
binding
.
llEmpty
.
isVisible
=
list
.
isEmpty
()
historyAdapter
.
submitList
(
list
)
}
private
fun
filterList
(
content
:
String
)
{
val
filterList
=
historyList
.
filter
{
it
.
name
.
contains
(
content
)
}
binding
.
llEmpty
.
isVisible
=
filterList
.
isEmpty
()
...
...
@@ -100,7 +101,7 @@ class HistoryFragment : BaseFragment<FragmentHistoryBinding>() {
val
item
=
list
.
map
{
gson
.
fromJson
(
it
,
HistoryBean
::
class
.
java
)
}
var
time
=
""
item
.
sortedBy
{
it
.
time
}
.
forEach
{
item
.
reversed
()
.
forEach
{
if
(
time
!=
it
.
time
.
toFormatTime
())
{
it
.
showTime
=
true
time
=
it
.
time
.
toFormatTime
()
...
...
app/src/main/java/com/base/browserwhite/ui/activity/search/SearchActivity.kt
View file @
f1dbcbd0
...
...
@@ -147,11 +147,12 @@ class SearchActivity : BaseActivity<ActivitySearchBinding>() {
binding
.
ivClear
.
visibility
=
View
.
VISIBLE
searchContent
=
""
isHomeSearch
=
false
}
binding
.
root
.
postDelayed
({
val
imm
=
getSystemService
(
INPUT_METHOD_SERVICE
)
as
InputMethodManager
imm
.
showSoftInput
(
binding
.
editWeb
,
InputMethodManager
.
SHOW_IMPLICIT
)
},
800
)
}
binding
.
editWeb
.
setOnClickListener
{
...
...
app/src/main/java/com/base/browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
View file @
f1dbcbd0
...
...
@@ -249,6 +249,9 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
shareIntent
.
setAction
(
Intent
.
ACTION_SEND
)
shareIntent
.
putExtra
(
Intent
.
EXTRA_TEXT
,
currentFragment
?.
url
)
shareIntent
.
setType
(
"text/plain"
)
runCatching
{
startActivity
(
shareIntent
)
}
}
binding
.
editWeb
.
setOnFocusChangeListener
{
v
,
hasFocus
->
if
(
hasFocus
)
{
...
...
app/src/main/res/layout/activity_search.xml
View file @
f1dbcbd0
...
...
@@ -42,8 +42,8 @@
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"-
2
dp"
android:layout_marginBottom=
"-
2
dp"
android:layout_marginEnd=
"-
3
dp"
android:layout_marginBottom=
"-
3
dp"
android:src=
"@mipmap/xuanze"
app:layout_constraintBottom_toBottomOf=
"@id/fl_search_engine"
app:layout_constraintEnd_toEndOf=
"@id/fl_search_engine"
...
...
@@ -53,7 +53,6 @@
<EditText
android:selectAllOnFocus=
"true"
android:id=
"@+id/edit_web"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
...
...
@@ -66,6 +65,7 @@
android:imeOptions=
"actionDone"
android:inputType=
"textUri"
android:paddingHorizontal=
"5dp"
android:selectAllOnFocus=
"true"
android:singleLine=
"true"
android:textColorHint=
"#858587"
android:textSize=
"14sp"
...
...
@@ -112,7 +112,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:text=
"Cancel"
android:textColor=
"
#0571ED
"
android:textColor=
"
@color/black
"
android:textSize=
"16sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_web_browser.xml
View file @
f1dbcbd0
...
...
@@ -5,15 +5,16 @@
android:id=
"@+id/main"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
tools:context=
".ui.activity.webbrowser.WebBrowserActivity"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_search"
android:layout_width=
"0dp"
android:layout_height=
"50dp"
android:layout_marginHorizontal=
"15dp"
android:layout_height=
"44dp"
android:layout_marginVertical=
"10dp"
android:layout_marginStart=
"15dp"
android:background=
"@drawable/bg_stroke_070709"
android:gravity=
"center"
android:orientation=
"horizontal"
...
...
@@ -48,8 +49,8 @@
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"-
2
dp"
android:layout_marginBottom=
"-
2
dp"
android:layout_marginEnd=
"-
3
dp"
android:layout_marginBottom=
"-
3
dp"
android:src=
"@mipmap/xuanze"
app:layout_constraintBottom_toBottomOf=
"@id/fl_search_engine"
app:layout_constraintEnd_toEndOf=
"@id/fl_search_engine"
...
...
@@ -121,7 +122,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_bottom"
android:layout_width=
"match_parent"
android:layout_height=
"
60
dp"
android:layout_height=
"
56
dp"
app:layout_constraintBottom_toBottomOf=
"parent"
>
<ImageView
...
...
app/src/main/res/layout/dialog_more_webbrowser.xml
View file @
f1dbcbd0
...
...
@@ -149,6 +149,7 @@
tools:ignore=
"ContentDescription"
/>
<TextView
android:textColor=
"@color/black"
android:id=
"@+id/tv_traceless"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -179,7 +180,7 @@
tools:ignore=
"HardcodedText"
/>
<View
android:layout_width=
"
match_parent
"
android:layout_width=
"
0dp
"
android:layout_height=
"1px"
android:layout_marginBottom=
"1dp"
android:background=
"#E5E6EB"
...
...
@@ -205,6 +206,7 @@
tools:ignore=
"ContentDescription"
/>
<TextView
android:textColor=
"@color/black"
android:id=
"@+id/tv_download"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -218,9 +220,9 @@
<View
android:layout_width=
"
match_parent
"
android:layout_width=
"
0dp
"
android:layout_height=
"1px"
android:layout_marginBottom=
"1
dp
"
android:layout_marginBottom=
"1
px
"
android:background=
"#E5E6EB"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
@@ -245,6 +247,7 @@
tools:ignore=
"ContentDescription"
/>
<TextView
android:textColor=
"@color/black"
android:id=
"@+id/tv_settings"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -258,9 +261,9 @@
<View
android:layout_width=
"
match_parent
"
android:layout_width=
"
0dp
"
android:layout_height=
"1px"
android:layout_marginBottom=
"1
dp
"
android:layout_marginBottom=
"1
px
"
android:background=
"#E5E6EB"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
@@ -285,6 +288,7 @@
tools:ignore=
"ContentDescription"
/>
<TextView
android:textColor=
"@color/black"
android:id=
"@+id/tv_inside_search"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -298,9 +302,9 @@
<View
android:layout_width=
"
match_parent
"
android:layout_width=
"
0dp
"
android:layout_height=
"1px"
android:layout_marginBottom=
"1
dp
"
android:layout_marginBottom=
"1
px
"
android:background=
"#E5E6EB"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
@@ -325,6 +329,7 @@
tools:ignore=
"ContentDescription"
/>
<TextView
android:textColor=
"@color/black"
android:id=
"@+id/tv_off"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -338,9 +343,9 @@
<View
android:layout_width=
"
match_parent
"
android:layout_width=
"
0dp
"
android:layout_height=
"1px"
android:layout_marginBottom=
"1
dp
"
android:layout_marginBottom=
"1
px
"
android:background=
"#E5E6EB"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
app/src/main/res/layout/fragment_home.xml
View file @
f1dbcbd0
...
...
@@ -121,8 +121,8 @@
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"-
2
dp"
android:layout_marginBottom=
"-
2
dp"
android:layout_marginEnd=
"-
3
dp"
android:layout_marginBottom=
"-
3
dp"
android:src=
"@mipmap/xuanze"
app:layout_constraintBottom_toBottomOf=
"@id/fl_search_engine"
app:layout_constraintEnd_toEndOf=
"@id/fl_search_engine"
...
...
@@ -169,10 +169,10 @@
</FrameLayout>
<TextView
android:layout_marginEnd=
"15dp"
android:id=
"@+id/tv_cancel"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"15dp"
android:text=
"Cancel"
android:textColor=
"#0571ED"
android:textSize=
"16sp"
...
...
app/src/main/res/layout/item_bookmark_history.xml
View file @
f1dbcbd0
<?xml version="1.0" encoding="utf-8"?>
<
androidx.constraintlayout.widget.Constraint
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"
horizont
al"
>
android:orientation=
"
vertic
al"
>
<FrameLayout
android:id=
"@+id/fl_time"
<LinearLayout
android:id=
"@+id/ll_time"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
app:layout_constraintBottom_toTopOf=
"@id/card"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<View
android:id=
"@+id/v_fenge"
android:layout_width=
"match_parent"
android:layout_height=
"6dp"
android:background=
"#EDF1F4"
/>
<TextView
android:id=
"@+id/tv_time"
android:layout_width=
"wrap_content"
...
...
@@ -34,7 +40,11 @@
android:layout_gravity=
"bottom"
android:background=
"#E5E6EB"
/>
</FrameLayout>
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<androidx.cardview.widget.CardView
android:id=
"@+id/card"
...
...
@@ -45,7 +55,7 @@
app:cardElevation=
"0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/fl_time
"
>
app:layout_constraintTop_toTopOf=
"parent
"
>
<TextView
android:id=
"@+id/tv_letters"
...
...
@@ -114,4 +124,6 @@
app:layout_constraintStart_toStartOf=
"@id/ll"
app:layout_constraintTop_toBottomOf=
"@id/ll"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/mipmap-xxhdpi/xuanze.png
View replaced file @
515d226d
View file @
f1dbcbd0
302 Bytes
|
W:
|
H:
223 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
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