Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PDF Viewer Scanner 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
PDF Viewer Scanner White
Commits
a3336964
Commit
a3336964
authored
Oct 11, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
2a61fb81
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
+23
-8
PdfSelectActivity.kt
...dfviewerscannerwhite/ui/document/pdf/PdfSelectActivity.kt
+4
-0
MainActivity.kt
...va/com/base/pdfviewerscannerwhite/ui/main/MainActivity.kt
+13
-7
DialogView.kt
...java/com/base/pdfviewerscannerwhite/ui/view/DialogView.kt
+6
-1
No files found.
app/src/main/java/com/base/pdfviewerscannerwhite/ui/document/pdf/PdfSelectActivity.kt
View file @
a3336964
...
...
@@ -111,6 +111,8 @@ class PdfSelectActivity : BaseActivity<ActivityPdfSelectBinding>(), DocumentView
AdmobInterstitialUtils
.
showInterstitialAd
(
this
)
{
flag
->
adapter
.
remove
(
it
)
}
}
else
{
adapter
.
remove
(
it
)
}
})
}
...
...
@@ -120,6 +122,8 @@ class PdfSelectActivity : BaseActivity<ActivityPdfSelectBinding>(), DocumentView
AdmobInterstitialUtils
.
showInterstitialAd
(
this
)
{
flag
->
adapter
.
remove
(
it
)
}
}
else
{
adapter
.
remove
(
it
)
}
})
}
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/ui/main/MainActivity.kt
View file @
a3336964
...
...
@@ -2,6 +2,7 @@ package com.base.pdfviewerscannerwhite.ui.main
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.app.Dialog
import
android.content.Intent
import
android.net.Uri
import
android.os.Bundle
...
...
@@ -146,15 +147,20 @@ class MainActivity : BaseActivity<ActivityMain2Binding>(), MainView {
}
}
private
var
permissionDialog
:
Dialog
?
=
null
private
fun
showPermissionThenBanner
()
{
showStoragePermission
(
launcher
,
if
(
permissionDialog
==
null
)
{
permissionDialog
=
showStoragePermission
(
launcher
,
allowAction
=
{
showMainBanner
()
},
denyAction
=
{
showMainBanner
()
},
dismissAction
=
{
permissionDialog
=
null
})
}
}
private
fun
showMainBanner
()
{
if
(!
bannerShowed
)
{
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/ui/view/DialogView.kt
View file @
a3336964
...
...
@@ -51,7 +51,8 @@ object DialogView {
launcher
:
ActivityLauncher
,
denyAction
:
(()
->
Unit
)?
=
null
,
allowAction
:
(()
->
Unit
)?
=
null
,
)
{
dismissAction
:
(()
->
Unit
)?
=
null
,
):
BottomSheetDialog
{
val
dialog
=
BottomSheetDialog
(
this
,
R
.
style
.
BottomSheetDialog
)
val
binding
=
DialogStoragePermissionBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
dialog
.
setContentView
(
binding
.
root
)
...
...
@@ -74,6 +75,10 @@ object DialogView {
dialog
.
dismiss
()
denyAction
?.
invoke
()
}
dialog
.
setOnDismissListener
{
dismissAction
?.
invoke
()
}
return
dialog
}
var
SortMode
=
UI_SORT_LAST_MODIFIED
...
...
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