Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Data Recovery 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
Data Recovery White
Commits
6e016b9d
Commit
6e016b9d
authored
Jul 12, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
3c3bedf7
b92e5802
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
DialogViews.kt
app/src/main/java/com/base/datarecovery/view/DialogViews.kt
+15
-2
No files found.
app/src/main/java/com/base/datarecovery/view/DialogViews.kt
View file @
6e016b9d
package
com.base.datarecovery.view
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.app.AlertDialog
import
android.app.Dialog
import
android.content.Context
...
...
@@ -22,6 +23,7 @@ import com.base.datarecovery.databinding.DialogPermissonOpenBinding
import
com.base.datarecovery.databinding.DialogRateStarBinding
import
com.base.datarecovery.databinding.DialogRecoveringBinding
import
com.base.datarecovery.databinding.DialogRemoveFileTipBinding
import
com.base.datarecovery.utils.AppPreferences
import
com.base.datarecovery.utils.LogEx
import
com.base.datarecovery.view.DialogViews.showCameraSettingDialog
import
com.base.datarecovery.view.DialogViews.showPinReEnterDialog
...
...
@@ -163,7 +165,8 @@ object DialogViews {
fun
Context
.
showImageImportDialog
(
import
:
()
->
Unit
,
camera
:
()
->
Unit
)
{
val
binding
=
DialogImageTakeBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
val
dialog
=
AlertDialog
.
Builder
(
this
,
R
.
style
.
CustomAlertDialogStyle
).
setView
(
binding
.
root
).
create
()
val
dialog
=
AlertDialog
.
Builder
(
this
,
R
.
style
.
CustomAlertDialogStyle
).
setView
(
binding
.
root
).
create
()
dialog
.
setContentView
(
binding
.
root
)
dialog
.
setCanceledOnTouchOutside
(
true
)
...
...
@@ -187,7 +190,8 @@ object DialogViews {
fun
Context
.
showCameraSettingDialog
()
{
val
binding
=
DialogCameraSettingBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
val
dialog
=
AlertDialog
.
Builder
(
this
,
R
.
style
.
CustomAlertDialogStyle
).
setView
(
binding
.
root
).
create
()
val
dialog
=
AlertDialog
.
Builder
(
this
,
R
.
style
.
CustomAlertDialogStyle
).
setView
(
binding
.
root
).
create
()
dialog
.
setContentView
(
binding
.
root
)
dialog
.
setCanceledOnTouchOutside
(
true
)
...
...
@@ -254,6 +258,15 @@ object DialogViews {
}
fun
Context
.
showExitFunctionDialog
(
exitAction
:
()
->
Unit
)
{
val
s
=
AppPreferences
.
getInstance
().
getString
(
"isShowBackIntAd"
,
"0"
).
toIntOrNull
()
?:
0
if
(
s
==
0
)
{
if
(
this
is
Activity
)
{
this
.
finish
()
}
return
}
val
binding
=
DialogExitFunctionBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
val
dialog
=
AlertDialog
.
Builder
(
this
).
create
()
dialog
.
setView
(
binding
.
root
)
...
...
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