Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PDF Reader 2
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 Reader 2
Commits
eb1076ae
Commit
eb1076ae
authored
Oct 28, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
ed77af08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
MainActivity.kt
...src/main/java/com/base/pdfreader2/ui/main/MainActivity.kt
+7
-4
PdfActivity.kt
app/src/main/java/com/base/pdfreader2/ui/pdf/PdfActivity.kt
+7
-2
No files found.
app/src/main/java/com/base/pdfreader2/ui/main/MainActivity.kt
View file @
eb1076ae
...
@@ -97,10 +97,6 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
...
@@ -97,10 +97,6 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
private
var
actionId
:
String
=
""
private
var
actionId
:
String
=
""
override
fun
initView
()
{
override
fun
initView
()
{
if
(
checkNeedRecreate
(
MyApplication
.
mainLanguage
))
{
return
}
BarUtils
.
setStatusBarLightMode
(
this
,
!
ConstObject
.
modeNight
)
BarUtils
.
setStatusBarLightMode
(
this
,
!
ConstObject
.
modeNight
)
if
(
ConstObject
.
modeNight
)
{
if
(
ConstObject
.
modeNight
)
{
BarUtils
.
setStatusBarColor
(
this
,
Color
.
BLACK
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
BLACK
)
...
@@ -110,6 +106,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
...
@@ -110,6 +106,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
// binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
// binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
// AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
// AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
if
(
checkNeedRecreate
(
MyApplication
.
mainLanguage
))
{
return
}
mainPresenter
=
MainPresenter
(
this
,
this
,
lifecycleScope
)
mainPresenter
=
MainPresenter
(
this
,
this
,
lifecycleScope
)
mainPresenter
.
initScannerLauncher
(
this
)
mainPresenter
.
initScannerLauncher
(
this
)
...
@@ -141,6 +141,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
...
@@ -141,6 +141,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
lateinit
var
callback
:
OnBackPressedCallback
lateinit
var
callback
:
OnBackPressedCallback
override
fun
initListener
()
{
override
fun
initListener
()
{
super
.
initListener
()
super
.
initListener
()
if
(
checkNeedRecreate
(
MyApplication
.
mainLanguage
))
{
return
}
callback
=
object
:
OnBackPressedCallback
(
false
)
{
callback
=
object
:
OnBackPressedCallback
(
false
)
{
override
fun
handleOnBackPressed
()
{
override
fun
handleOnBackPressed
()
{
...
...
app/src/main/java/com/base/pdfreader2/ui/pdf/PdfActivity.kt
View file @
eb1076ae
...
@@ -95,9 +95,10 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView {
...
@@ -95,9 +95,10 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView {
delay
(
150
)
delay
(
150
)
if
(
binding
.
progressBar
.
progress
>=
Random
.
nextInt
(
25
,
40
))
{
if
(
binding
.
progressBar
.
progress
>=
Random
.
nextInt
(
25
,
40
))
{
binding
.
flLoading
.
visibility
=
View
.
GONE
binding
.
flLoading
.
visibility
=
View
.
GONE
cancel
()
break
}
}
}
}
showGuide
()
}
}
}
}
...
@@ -150,6 +151,11 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView {
...
@@ -150,6 +151,11 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView {
SpStringUtils
.
addSpString
(
LAST_VIEW_KEY
,
"${path}_/_${System.currentTimeMillis()}"
)
SpStringUtils
.
addSpString
(
LAST_VIEW_KEY
,
"${path}_/_${System.currentTimeMillis()}"
)
}
}
showGuide
()
AdmobNativeUtils
.
showNativeAd
(
this
,
binding
.
flAd
,
R
.
layout
.
layout_admob_document_in
)
}
private
fun
showGuide
()
{
if
(!
haveGuideGesture
)
{
if
(!
haveGuideGesture
)
{
binding
.
flGuideGesture
.
visibility
=
View
.
VISIBLE
binding
.
flGuideGesture
.
visibility
=
View
.
VISIBLE
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
...
@@ -157,7 +163,6 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView {
...
@@ -157,7 +163,6 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView {
binding
.
flGuideGesture
.
visibility
=
View
.
GONE
binding
.
flGuideGesture
.
visibility
=
View
.
GONE
}
}
}
}
AdmobNativeUtils
.
showNativeAd
(
this
,
binding
.
flAd
,
R
.
layout
.
layout_admob_document_in
)
}
}
override
fun
jumpPage
(
pageIndex
:
Int
)
{
override
fun
jumpPage
(
pageIndex
:
Int
)
{
...
...
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