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
5cc0312c
Commit
5cc0312c
authored
Sep 05, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Plain Diff
update
parents
d808999d
9da34142
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
45 deletions
+71
-45
MyApplication.kt
app/src/main/java/com/base/browserwhite/MyApplication.kt
+0
-2
NotificationPushUtil.kt
...in/java/com/base/browserwhite/fcm/NotificationPushUtil.kt
+0
-1
BookmarkActivity.kt
...ase/browserwhite/ui/activity/bookmark/BookmarkActivity.kt
+3
-0
WebBrowserActivity.kt
...browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
+12
-1
DialogViews.kt
...c/main/java/com/base/browserwhite/ui/views/DialogViews.kt
+15
-2
dialog_more_webbrowser.xml
app/src/main/res/layout/dialog_more_webbrowser.xml
+41
-39
No files found.
app/src/main/java/com/base/browserwhite/MyApplication.kt
View file @
5cc0312c
...
...
@@ -54,8 +54,6 @@ class MyApplication : Application() {
}
}
private
var
packageBroadcastReceiver
:
PackageBroadcastReceiver
?
=
null
fun
initApp
()
{
FacebookSdk
.
sdkInitialize
(
applicationContext
)
val
topic
=
ConfigHelper
.
packageName
+
"_push"
...
...
app/src/main/java/com/base/browserwhite/fcm/NotificationPushUtil.kt
View file @
5cc0312c
...
...
@@ -46,7 +46,6 @@ object NotificationPushUtil {
}
private
fun
getCurrentDate
():
String
{
val
dateFormat
=
SimpleDateFormat
(
"yyyy-MM-dd"
,
Locale
.
getDefault
())
val
currentDate
=
Calendar
.
getInstance
().
time
...
...
app/src/main/java/com/base/browserwhite/ui/activity/bookmark/BookmarkActivity.kt
View file @
5cc0312c
...
...
@@ -71,6 +71,9 @@ class BookmarkActivity : BaseActivity<ActivityBookmarkBinding>() {
}
}
})
// val page = intent.extras?.getInt("page", 0) ?: 0
// binding.viewPager2.currentItem = page
}
override
fun
initListener
()
{
...
...
app/src/main/java/com/base/browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
View file @
5cc0312c
...
...
@@ -271,7 +271,18 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
}
}
})
},
refreshAction
=
{
currentFragment
?.
reloadWebView
()
},
historyAction
=
{
startActivity
(
Intent
(
this
,
BookmarkActivity
::
class
.
java
).
apply
{
putExtra
(
"page"
,
1
)
})
finish
()
}
)
}
binding
.
ivShare
.
setOnClickListener
{
...
...
app/src/main/java/com/base/browserwhite/ui/views/DialogViews.kt
View file @
5cc0312c
...
...
@@ -333,10 +333,11 @@ object DialogViews {
fun
Context
.
showWebBrowserMoreDialog
(
bookmarkAdded
:
Boolean
=
false
,
bookmarkAction
:
(()
->
Unit
)?
=
null
,
//打开书签
joinAction
:
(()
->
Unit
)?
=
null
//加入书签
joinAction
:
(()
->
Unit
)?
=
null
,
//加入书签
refreshAction
:
(()
->
Unit
)?
=
null
,
//刷新
historyAction
:
(()
->
Unit
)?
=
null
,
//历史记录
)
{
val
dialog
=
BottomSheetDialog
(
this
,
R
.
style
.
BottomSheetDialog
)
val
binding
=
DialogMoreWebbrowserBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
dialog
.
setContentView
(
binding
.
root
)
...
...
@@ -369,6 +370,18 @@ object DialogViews {
joinAction
?.
invoke
()
}
}
arrayOf
(
binding
.
ivRefresh
,
binding
.
tvRefresh
).
forEach
{
it
.
setOnClickListener
{
dialog
.
dismiss
()
refreshAction
?.
invoke
()
}
}
arrayOf
(
binding
.
ivHistory
,
binding
.
tvHistory
).
forEach
{
it
.
setOnClickListener
{
dialog
.
dismiss
()
historyAction
?.
invoke
()
}
}
}
...
...
app/src/main/res/layout/dialog_more_webbrowser.xml
View file @
5cc0312c
...
...
@@ -32,40 +32,6 @@
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"ContentDescription"
/>
<ImageView
android:id=
"@+id/iv_history"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:src=
"@mipmap/history_browser"
app:layout_constraintEnd_toStartOf=
"@id/iv_refresh"
app:layout_constraintStart_toEndOf=
"@id/iv_bookmark"
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"ContentDescription"
/>
<ImageView
android:id=
"@+id/iv_refresh"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:src=
"@mipmap/refresh_browser"
app:layout_constraintEnd_toStartOf=
"@id/iv_join_bookmark"
app:layout_constraintStart_toEndOf=
"@id/iv_history"
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"ContentDescription"
/>
<ImageView
android:id=
"@+id/iv_join_bookmark"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:src=
"@mipmap/join_browser"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/iv_refresh"
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"ContentDescription"
/>
<TextView
android:id=
"@+id/tv_bookmark"
android:layout_width=
"wrap_content"
...
...
@@ -80,6 +46,18 @@
app:layout_constraintTop_toBottomOf=
"@id/iv_bookmark"
tools:ignore=
"HardcodedText"
/>
<ImageView
android:id=
"@+id/iv_history"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:src=
"@mipmap/history_browser"
app:layout_constraintEnd_toStartOf=
"@id/iv_refresh"
app:layout_constraintStart_toEndOf=
"@id/iv_bookmark"
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"ContentDescription"
/>
<TextView
android:id=
"@+id/tv_history"
android:layout_width=
"wrap_content"
...
...
@@ -94,6 +72,18 @@
app:layout_constraintTop_toBottomOf=
"@id/iv_history"
tools:ignore=
"HardcodedText"
/>
<ImageView
android:id=
"@+id/iv_refresh"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:src=
"@mipmap/refresh_browser"
app:layout_constraintEnd_toStartOf=
"@id/iv_join_bookmark"
app:layout_constraintStart_toEndOf=
"@id/iv_history"
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"ContentDescription"
/>
<TextView
android:id=
"@+id/tv_refresh"
android:layout_width=
"wrap_content"
...
...
@@ -109,6 +99,18 @@
tools:ignore=
"HardcodedText"
/>
<ImageView
android:id=
"@+id/iv_join_bookmark"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:src=
"@mipmap/join_browser"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/iv_refresh"
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"ContentDescription"
/>
<TextView
android:id=
"@+id/tv_join_bookmark"
android:layout_width=
"wrap_content"
...
...
@@ -149,12 +151,12 @@
tools:ignore=
"ContentDescription"
/>
<TextView
android:textColor=
"@color/black"
android:id=
"@+id/tv_traceless"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"12dp"
android:text=
"Traceless"
android:textColor=
"@color/black"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/iv_traceless"
...
...
@@ -206,12 +208,12 @@
tools:ignore=
"ContentDescription"
/>
<TextView
android:textColor=
"@color/black"
android:id=
"@+id/tv_download"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"12dp"
android:text=
"Download"
android:textColor=
"@color/black"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/iv_download"
...
...
@@ -247,12 +249,12 @@
tools:ignore=
"ContentDescription"
/>
<TextView
android:textColor=
"@color/black"
android:id=
"@+id/tv_settings"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"12dp"
android:text=
"Settings"
android:textColor=
"@color/black"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/iv_settings"
...
...
@@ -288,12 +290,12 @@
tools:ignore=
"ContentDescription"
/>
<TextView
android:textColor=
"@color/black"
android:id=
"@+id/tv_inside_search"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"12dp"
android:text=
"Inside page search"
android:textColor=
"@color/black"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/iv_inside_search"
...
...
@@ -329,12 +331,12 @@
tools:ignore=
"ContentDescription"
/>
<TextView
android:textColor=
"@color/black"
android:id=
"@+id/tv_off"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"12dp"
android:text=
"Off"
android:textColor=
"@color/black"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/iv_off"
...
...
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