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
3116b084
Commit
3116b084
authored
Sep 06, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
9fcdadb0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
8 deletions
+34
-8
WebBrowserActivity.kt
...browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
+25
-0
DialogViews.kt
...c/main/java/com/base/browserwhite/ui/views/DialogViews.kt
+2
-1
activity_web_browser.xml
app/src/main/res/layout/activity_web_browser.xml
+7
-7
weixuan_wuhen.png
app/src/main/res/mipmap-xxhdpi/weixuan_wuhen.png
+0
-0
xuanz_wuhen.png
app/src/main/res/mipmap-xxhdpi/xuanz_wuhen.png
+0
-0
No files found.
app/src/main/java/com/base/browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
View file @
3116b084
...
@@ -56,6 +56,7 @@ import com.base.browserwhite.utils.LinkSearchUtils.getYandexSearch
...
@@ -56,6 +56,7 @@ import com.base.browserwhite.utils.LinkSearchUtils.getYandexSearch
import
com.base.browserwhite.utils.PermissionUtils.checkStorePermission
import
com.base.browserwhite.utils.PermissionUtils.checkStorePermission
import
com.base.browserwhite.utils.SpBeanUtils
import
com.base.browserwhite.utils.SpBeanUtils
import
com.base.browserwhite.utils.SpBeanUtils.BOOKMARK_SP_KEY
import
com.base.browserwhite.utils.SpBeanUtils.BOOKMARK_SP_KEY
import
com.base.browserwhite.utils.ToastUtils.toast
import
com.base.browserwhite.utils.Utils
import
com.base.browserwhite.utils.Utils
import
com.base.browserwhite.utils.Utils.dpToPx
import
com.base.browserwhite.utils.Utils.dpToPx
import
com.google.gson.Gson
import
com.google.gson.Gson
...
@@ -134,6 +135,11 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
...
@@ -134,6 +135,11 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
resetSearchLayout
()
resetSearchLayout
()
}
}
}
}
if
(
webPrivacy
)
{
binding
.
ivPrivacy
.
setImageResource
(
R
.
mipmap
.
xuanz_wuhen
)
}
else
{
binding
.
ivPrivacy
.
setImageResource
(
R
.
mipmap
.
weixuan_wuhen
)
}
}
}
@Deprecated
(
"Deprecated in Java"
)
@Deprecated
(
"Deprecated in Java"
)
...
@@ -277,6 +283,20 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
...
@@ -277,6 +283,20 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
SearchActivity
.
startActivityWithButtonExpandAnimation
(
this
,
binding
.
clSearch
,
0
)
SearchActivity
.
startActivityWithButtonExpandAnimation
(
this
,
binding
.
clSearch
,
0
)
}
}
binding
.
ivPrivacy
.
setOnClickListener
{
if
(
webPrivacy
)
{
webPrivacy
=
false
setEditPrivacy
(
this
,
binding
.
editWeb
)
binding
.
ivPrivacy
.
setImageResource
(
R
.
mipmap
.
weixuan_wuhen
)
toast
(
"Disable incognito"
)
}
else
{
webPrivacy
=
true
setEditPrivacy
(
this
,
binding
.
editWeb
)
binding
.
ivPrivacy
.
setImageResource
(
R
.
mipmap
.
xuanz_wuhen
)
toast
(
"Enable incognito"
)
}
}
binding
.
ivMore
.
setOnClickListener
{
binding
.
ivMore
.
setOnClickListener
{
val
json
=
getAddedBookmarkJson
(
currentFragment
?.
bookmarkBean
?.
url
?:
""
)
val
json
=
getAddedBookmarkJson
(
currentFragment
?.
bookmarkBean
?.
url
?:
""
)
...
@@ -328,6 +348,11 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
...
@@ -328,6 +348,11 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
},
},
privacyAction
=
{
privacyAction
=
{
setEditPrivacy
(
this
,
binding
.
editWeb
)
setEditPrivacy
(
this
,
binding
.
editWeb
)
if
(
webPrivacy
)
{
binding
.
ivPrivacy
.
setImageResource
(
R
.
mipmap
.
xuanz_wuhen
)
}
else
{
binding
.
ivPrivacy
.
setImageResource
(
R
.
mipmap
.
weixuan_wuhen
)
}
},
},
offAction
=
{
offAction
=
{
finishToMain
()
finishToMain
()
...
...
app/src/main/java/com/base/browserwhite/ui/views/DialogViews.kt
View file @
3116b084
...
@@ -283,7 +283,7 @@ object DialogViews {
...
@@ -283,7 +283,7 @@ object DialogViews {
}
}
fun
Context
.
showDeleteTipDialog
(
desc
:
String
?
=
null
,
action
:
()
->
Unit
)
{
fun
Context
.
showDeleteTipDialog
(
desc
:
String
?
=
null
,
confirm
:
String
?
=
null
,
action
:
()
->
Unit
)
{
val
binding
=
DialogDeleteTipBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
val
binding
=
DialogDeleteTipBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
val
dialog
=
AlertDialog
.
Builder
(
this
).
create
()
val
dialog
=
AlertDialog
.
Builder
(
this
).
create
()
dialog
.
setView
(
binding
.
root
)
dialog
.
setView
(
binding
.
root
)
...
@@ -294,6 +294,7 @@ object DialogViews {
...
@@ -294,6 +294,7 @@ object DialogViews {
dialog
.
window
?.
attributes
=
params
dialog
.
window
?.
attributes
=
params
dialog
.
window
?.
setBackgroundDrawableResource
(
android
.
R
.
color
.
transparent
)
dialog
.
window
?.
setBackgroundDrawableResource
(
android
.
R
.
color
.
transparent
)
desc
?.
let
{
binding
.
tvDesc
.
text
=
it
}
desc
?.
let
{
binding
.
tvDesc
.
text
=
it
}
confirm
?.
let
{
binding
.
tvDelete
.
text
=
it
}
binding
.
tvCancel
.
setOnClickListener
{
binding
.
tvCancel
.
setOnClickListener
{
dialog
.
dismiss
()
dialog
.
dismiss
()
}
}
...
...
app/src/main/res/layout/activity_web_browser.xml
View file @
3116b084
...
@@ -162,21 +162,21 @@
...
@@ -162,21 +162,21 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/home"
android:src=
"@mipmap/home"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@id/
tv_label
"
app:layout_constraintEnd_toStartOf=
"@id/
iv_privacy
"
app:layout_constraintStart_toEndOf=
"@id/iv_right"
app:layout_constraintStart_toEndOf=
"@id/iv_right"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"ContentDescription"
/>
tools:ignore=
"ContentDescription"
/>
<TextView
<ImageView
android:id=
"@+id/tv_label"
android:src=
"@mipmap/weixuan_wuhen"
android:id=
"@+id/iv_privacy"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@mipmap/biaoqian"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@id/iv_more"
app:layout_constraintEnd_toStartOf=
"@id/iv_more"
app:layout_constraintStart_toEndOf=
"@id/iv_home"
app:layout_constraintStart_toEndOf=
"@id/iv_home"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"ContentDescription"
/>
<ImageView
<ImageView
android:id=
"@+id/iv_more"
android:id=
"@+id/iv_more"
...
@@ -185,7 +185,7 @@
...
@@ -185,7 +185,7 @@
android:src=
"@mipmap/gengduo"
android:src=
"@mipmap/gengduo"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/
tv_label
"
app:layout_constraintStart_toEndOf=
"@id/
iv_privacy
"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"ContentDescription"
/>
tools:ignore=
"ContentDescription"
/>
...
...
app/src/main/res/mipmap-xxhdpi/weixuan_wuhen.png
0 → 100644
View file @
3116b084
2.98 KB
app/src/main/res/mipmap-xxhdpi/xuanz_wuhen.png
0 → 100644
View file @
3116b084
3.28 KB
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