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
075e8d34
Commit
075e8d34
authored
Sep 02, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
718bf2e5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
12 deletions
+22
-12
DownloadDialog.kt
.../base/browserwhite/ui/activity/download/DownloadDialog.kt
+2
-2
DialogViews.kt
...c/main/java/com/base/browserwhite/ui/views/DialogViews.kt
+6
-8
PermissionDialog.kt
...n/java/com/base/browserwhite/ui/views/PermissionDialog.kt
+1
-1
RateDialog.kt
...rc/main/java/com/base/browserwhite/ui/views/RateDialog.kt
+1
-1
styles.xml
app/src/main/res/values/styles.xml
+12
-0
No files found.
app/src/main/java/com/base/browserwhite/ui/activity/download/DownloadDialog.kt
View file @
075e8d34
...
...
@@ -31,7 +31,7 @@ object DownloadDialog {
dismissAction
:
()
->
Unit
)
{
val
TAG
=
"DownloadVideoDialog"
val
dialog
=
BottomSheetDialog
(
this
)
val
dialog
=
BottomSheetDialog
(
this
,
R
.
style
.
BottomSheetDialog
)
val
binding
=
DialogDownloadVideoBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
dialog
.
setContentView
(
binding
.
root
)
dialog
.
setCanceledOnTouchOutside
(
false
)
...
...
@@ -68,7 +68,7 @@ object DownloadDialog {
}
fun
Context
.
showDownloadConfirmDialog
(
item
:
DownloadBean
,
download
:
()
->
Unit
)
{
val
dialog
=
BottomSheetDialog
(
this
)
val
dialog
=
BottomSheetDialog
(
this
,
R
.
style
.
BottomSheetDialog
)
val
binding
=
DialogDownloadConfirmBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
dialog
.
setContentView
(
binding
.
root
)
dialog
.
setCanceledOnTouchOutside
(
false
)
...
...
app/src/main/java/com/base/browserwhite/ui/views/DialogViews.kt
View file @
075e8d34
...
...
@@ -3,12 +3,13 @@ package com.base.browserwhite.ui.views
import
android.app.AlertDialog
import
android.content.Context
import
android.content.Intent
import
android.
net.Uri
import
android.
os.Build
import
android.view.Gravity
import
android.view.LayoutInflater
import
android.view.View
import
android.widget.FrameLayout
import
android.widget.Toast
import
androidx.core.content.ContextCompat
import
androidx.core.view.isVisible
import
com.base.browserwhite.R
import
com.base.browserwhite.bean.ConstObject
...
...
@@ -30,8 +31,6 @@ import com.base.browserwhite.help.Constants
import
com.base.browserwhite.help.RxBus
import
com.base.browserwhite.ui.activity.about.AboutActivity
import
com.base.browserwhite.ui.activity.feedback.FeedbackActivity
import
com.base.browserwhite.ui.views.DialogViews.showDefaultBrowserDialog
import
com.base.browserwhite.ui.views.DialogViews.showSearchEngineDialog
import
com.base.browserwhite.utils.ActivityLauncher
import
com.base.browserwhite.utils.AppPreferences
import
com.base.browserwhite.utils.RoleManagerUtils.isDefaultBrowser
...
...
@@ -120,11 +119,10 @@ object DialogViews {
}
fun
Context
.
showMyAccountDialog
(
launcher
:
ActivityLauncher
)
{
val
dialog
=
BottomSheetDialog
(
this
)
val
dialog
=
BottomSheetDialog
(
this
,
R
.
style
.
BottomSheetDialog
)
val
binding
=
DialogMyAccountBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
dialog
.
setContentView
(
binding
.
root
)
dialog
.
setCanceledOnTouchOutside
(
false
)
dialog
.
show
()
val
parentView
=
binding
.
root
.
parent
as
View
...
...
@@ -156,7 +154,7 @@ object DialogViews {
YANDEX
->
binding
.
ivSearchEngine
.
setImageResource
(
R
.
mipmap
.
m_yandex
)
BAIDU
->
binding
.
ivSearchEngine
.
setImageResource
(
R
.
mipmap
.
m_baidu
)
}
RxBus
.
get
().
post
(
Constants
.
CHANGE_SEARCH_TYPE
,
searchEngineSp
)
RxBus
.
get
().
post
(
Constants
.
CHANGE_SEARCH_TYPE
,
searchEngineSp
)
}
}
binding
.
clDefaultBrowser
.
isVisible
=
!
isDefaultBrowser
()
...
...
@@ -303,7 +301,7 @@ object DialogViews {
fun
Context
.
showDefaultBrowserDialog
(
launcher
:
ActivityLauncher
)
{
val
dialog
=
BottomSheetDialog
(
this
)
val
dialog
=
BottomSheetDialog
(
this
,
R
.
style
.
BottomSheetDialog
)
val
binding
=
DialogDefaultBrowserBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
dialog
.
setContentView
(
binding
.
root
)
dialog
.
setCanceledOnTouchOutside
(
false
)
...
...
@@ -335,7 +333,7 @@ object DialogViews {
)
{
val
dialog
=
BottomSheetDialog
(
this
)
val
dialog
=
BottomSheetDialog
(
this
,
R
.
style
.
BottomSheetDialog
)
val
binding
=
DialogMoreWebbrowserBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
dialog
.
setContentView
(
binding
.
root
)
dialog
.
setCanceledOnTouchOutside
(
false
)
...
...
app/src/main/java/com/base/browserwhite/ui/views/PermissionDialog.kt
View file @
075e8d34
...
...
@@ -57,7 +57,7 @@ object PermissionDialog {
@SuppressLint
(
"SetTextI18n"
)
fun
Context
.
showPermissionBottomSheet
(
launcher
:
ActivityLauncher
,
agreeAction
:
()
->
Unit
)
{
val
dialog
=
BottomSheetDialog
(
this
)
val
dialog
=
BottomSheetDialog
(
this
,
R
.
style
.
BottomSheetDialog
)
val
binding
=
DialogPermissionStorageBottomBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
dialog
.
setContentView
(
binding
.
root
)
dialog
.
setCanceledOnTouchOutside
(
false
)
...
...
app/src/main/java/com/base/browserwhite/ui/views/RateDialog.kt
View file @
075e8d34
...
...
@@ -23,7 +23,7 @@ object RateDialog {
}
}
val
dialog
=
BottomSheetDialog
(
this
)
val
dialog
=
BottomSheetDialog
(
this
,
R
.
style
.
BottomSheetDialog
)
val
binding
=
DialogRateStarBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
dialog
.
setContentView
(
binding
.
root
)
dialog
.
setCanceledOnTouchOutside
(
false
)
...
...
app/src/main/res/values/styles.xml
View file @
075e8d34
...
...
@@ -9,4 +9,16 @@
<item
name=
"android:background"
>
?android:attr/colorBackground
</item>
<item
name=
"android:textColor"
>
?android:attr/textColorPrimary
</item>
</style>
<style
name=
"BottomSheetDialog"
parent=
"Theme.Design.Light.BottomSheetDialog"
>
<item
name=
"bottomSheetStyle"
>
@style/bottomSheetStyleWrapper
</item>
<!--去掉背景阴影-->
<!-- <item name="android:backgroundDimEnabled">false</item>-->
</style>
<style
name=
"bottomSheetStyleWrapper"
parent=
"Widget.Design.BottomSheet.Modal"
>
<item
name=
"android:background"
>
@android:color/transparent
</item>
</style>
</resources>
\ No newline at end of file
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