Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PDF Viewer Scanner White ago
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
kuxulei
PDF Viewer Scanner White ago
Commits
bc34ac4c
Commit
bc34ac4c
authored
Oct 10, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
3064c296
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
276 additions
and
124 deletions
+276
-124
MyApplication.kt
...va/com/base/pdfviewerscannerwhite/helper/MyApplication.kt
+1
-0
SplashActivity.kt
...om/base/pdfviewerscannerwhite/ui/splash/SplashActivity.kt
+69
-57
SplashPresenter.kt
...m/base/pdfviewerscannerwhite/ui/splash/SplashPresenter.kt
+15
-8
KotlinExt.kt
...in/java/com/base/pdfviewerscannerwhite/utils/KotlinExt.kt
+6
-0
UmpUtils.kt
...ain/java/com/base/pdfviewerscannerwhite/utils/UmpUtils.kt
+69
-38
progress_bg.xml
app/src/main/res/drawable/progress_bg.xml
+12
-20
splash_bp.xml
app/src/main/res/drawable/splash_bp.xml
+1
-1
activity_splash_2.xml
app/src/main/res/layout/activity_splash_2.xml
+96
-0
document_all.png
app/src/main/res/mipmap-xxhdpi/document_all.png
+0
-0
qdyebg.png
app/src/main/res/mipmap-xxhdpi/qdyebg.png
+0
-0
qdylogo.png
app/src/main/res/mipmap-xxhdpi/qdylogo.png
+0
-0
strings.xml
app/src/main/res/values/strings.xml
+7
-0
No files found.
app/src/main/java/com/base/pdfviewerscannerwhite/helper/MyApplication.kt
View file @
bc34ac4c
...
@@ -35,6 +35,7 @@ class MyApplication : Application() {
...
@@ -35,6 +35,7 @@ class MyApplication : Application() {
var
pdfSplitLanguage
:
String
=
Locale
.
ENGLISH
.
language
var
pdfSplitLanguage
:
String
=
Locale
.
ENGLISH
.
language
var
wordLanguage
:
String
=
Locale
.
ENGLISH
.
language
var
wordLanguage
:
String
=
Locale
.
ENGLISH
.
language
var
umpCanAd
:
Boolean
=
true
@JvmField
@JvmField
var
PAUSED_VALUE
=
0
var
PAUSED_VALUE
=
0
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/ui/splash/SplashActivity.kt
View file @
bc34ac4c
...
@@ -7,40 +7,41 @@ import android.graphics.Color
...
@@ -7,40 +7,41 @@ import android.graphics.Color
import
android.os.Build
import
android.os.Build
import
androidx.activity.result.contract.ActivityResultContracts
import
androidx.activity.result.contract.ActivityResultContracts
import
androidx.lifecycle.lifecycleScope
import
androidx.lifecycle.lifecycleScope
import
com.base.pdfviewerscannerwhite.BuildConfig
import
com.base.pdfviewerscannerwhite.R
import
com.base.pdfviewerscannerwhite.ads.AdmobHelper.initAdmobAd
import
com.base.pdfviewerscannerwhite.ads.AdmobHelper.initAdmobAd
import
com.base.pdfviewerscannerwhite.ads.admob.AdmobOpenUtils
import
com.base.pdfviewerscannerwhite.ads.admob.AdmobOpenUtils
import
com.base.pdfviewerscannerwhite.bean.ConstObject.haveSelectLanguage
import
com.base.pdfviewerscannerwhite.bean.ConstObject.haveSelectLanguage
import
com.base.pdfviewerscannerwhite.bean.ConstObject.ifAgreePrivacy
import
com.base.pdfviewerscannerwhite.bean.ConstObject.ifAgreePrivacy
import
com.base.pdfviewerscannerwhite.databinding.ActivitySplashBinding
import
com.base.pdfviewerscannerwhite.databinding.ActivitySplash
2
Binding
import
com.base.pdfviewerscannerwhite.helper.BaseActivity
import
com.base.pdfviewerscannerwhite.helper.BaseActivity
import
com.base.pdfviewerscannerwhite.helper.MyApplication
import
com.base.pdfviewerscannerwhite.helper.MyApplication
import
com.base.pdfviewerscannerwhite.helper.MyApplication.Companion.umpCanAd
import
com.base.pdfviewerscannerwhite.service.StayNotificationService.Companion.startStayNotification
import
com.base.pdfviewerscannerwhite.service.StayNotificationService.Companion.startStayNotification
import
com.base.pdfviewerscannerwhite.ui.main.MainActivity
import
com.base.pdfviewerscannerwhite.ui.main.MainActivity
import
com.base.pdfviewerscannerwhite.ui.set.SetLanguageActivity
import
com.base.pdfviewerscannerwhite.ui.set.SetLanguageActivity
import
com.base.pdfviewerscannerwhite.utils.BarUtils
import
com.base.pdfviewerscannerwhite.utils.BarUtils
import
com.base.pdfviewerscannerwhite.utils.LogEx
import
com.base.pdfviewerscannerwhite.utils.LogEx
import
com.base.pdfviewerscannerwhite.utils.ToastUtils.toast
import
com.base.pdfviewerscannerwhite.utils.UmpUtils
import
com.base.pdfviewerscannerwhite.utils.UmpUtils.requestUMP
import
com.base.pdfviewerscannerwhite.utils.UmpUtils.requestUMP
import
kotlinx.coroutines.Dispatchers
import
com.cherry.lib.doc.office.system.IFind
import
kotlinx.coroutines.Job
import
java.util.Calendar
import
kotlinx.coroutines.cancel
import
kotlinx.coroutines.delay
import
kotlinx.coroutines.isActive
import
kotlinx.coroutines.launch
import
java.util.concurrent.atomic.AtomicBoolean
import
java.util.concurrent.atomic.AtomicBoolean
@SuppressLint
(
"CustomSplashScreen"
)
@SuppressLint
(
"CustomSplashScreen"
)
class
SplashActivity
:
BaseActivity
<
ActivitySplashBinding
>(),
SplashView
{
class
SplashActivity
:
BaseActivity
<
ActivitySplash
2
Binding
>(),
SplashView
{
private
val
TAG
=
"SplashActivity"
private
val
TAG
=
"SplashActivity"
private
var
job
:
Job
?
=
null
private
lateinit
var
splashPresenter
:
SplashPresenter
private
lateinit
var
splashPresenter
:
SplashPresenter
override
val
binding
:
ActivitySplashBinding
by
lazy
{
override
val
binding
:
ActivitySplash
2
Binding
by
lazy
{
ActivitySplashBinding
.
inflate
(
layoutInflater
)
ActivitySplash
2
Binding
.
inflate
(
layoutInflater
)
}
}
var
canAd
:
Boolean
=
true
@SuppressLint
(
"SetTextI18n"
)
override
fun
initView
()
{
override
fun
initView
()
{
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
...
@@ -52,24 +53,63 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
...
@@ -52,24 +53,63 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
}
}
splashPresenter
=
SplashPresenter
(
this
)
splashPresenter
=
SplashPresenter
(
this
)
// 获取当前日期
val
calendar
:
Calendar
=
Calendar
.
getInstance
()
val
month
:
Int
=
calendar
.
get
(
Calendar
.
MONTH
)
// 获取当月的第几天
val
dayOfMonth
:
Int
=
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
)
//是星期几
val
dayOfWeek
=
calendar
.
get
(
Calendar
.
DAY_OF_WEEK
)
val
dayOfWeekName
=
when
(
dayOfWeek
)
{
Calendar
.
SUNDAY
->
R
.
string
.
sunday
Calendar
.
MONDAY
->
R
.
string
.
monday
Calendar
.
TUESDAY
->
R
.
string
.
tuesday
Calendar
.
WEDNESDAY
->
R
.
string
.
wednesday
Calendar
.
THURSDAY
->
R
.
string
.
thursday
Calendar
.
FRIDAY
->
R
.
string
.
friday
Calendar
.
SATURDAY
->
R
.
string
.
saturday
else
->
0
}
binding
.
tvXingqi
.
text
=
resources
.
getString
(
dayOfWeekName
)
val
monthName
=
when
(
month
)
{
0
->
"January"
1
->
"February"
2
->
"March"
3
->
"April"
4
->
"May"
5
->
"June"
6
->
"July"
7
->
"August"
8
->
"September"
9
->
"October"
10
->
"November"
11
->
"December"
else
->
"Unknown"
}
binding
.
tvMonthDay
.
text
=
"$monthName $dayOfMonth"
val
isHotLaunch
=
intent
.
extras
?.
getBoolean
(
"isHotLaunch"
)
?:
false
if
(
BuildConfig
.
DEBUG
)
{
toast
(
"isHotLaunch=$isHotLaunch"
)
}
ifAgreePrivacy
=
true
ifAgreePrivacy
=
true
if
(
ifAgreePrivacy
)
{
if
(
ifAgreePrivacy
)
{
requestUMP
(
this
,
loadAndShowErrorAction
=
{
if
(
isHotLaunch
)
{
LogEx
.
logDebug
(
TAG
,
"loadAndShowErrorAction"
)
agreePrivacy
()
agreePrivacy
()
}
else
{
},
UmpUtils
.
callback
=
{
formErrorAction
=
{
LogEx
.
logDebug
(
TAG
,
"UmpUtils.callback"
)
LogEx
.
logDebug
(
TAG
,
"formErrorAction"
)
umpCanAd
=
it
agreePrivacy
()
},
dialogAction
=
{
LogEx
.
logDebug
(
TAG
,
"dialogAction $it"
)
canAd
=
it
agreePrivacy
()
agreePrivacy
()
})
}
requestUMP
(
this
)
}
}
}
}
}
...
@@ -80,6 +120,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
...
@@ -80,6 +120,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
splashPresenter
.
pauseJumpJob
()
splashPresenter
.
pauseJumpJob
()
}
}
},
onHidden
=
{
},
onHidden
=
{
LogEx
.
logDebug
(
TAG
,
"ad jumpNext"
)
jumpNext
()
jumpNext
()
})
})
...
@@ -88,43 +129,16 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
...
@@ -88,43 +129,16 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
override
fun
agreePrivacy
()
{
override
fun
agreePrivacy
()
{
startStayNotification
()
startStayNotification
()
if
(
c
anAd
)
{
if
(
umpC
anAd
)
{
initAdmobAd
()
initAdmobAd
()
showAd
()
showAd
()
}
}
s
tartProgressJob
()
s
plashPresenter
.
startJumpJob
=
true
splashPresenter
.
startJumpJob
(
lifecycleScope
)
splashPresenter
.
startJumpJob
(
lifecycleScope
)
}
}
/**
* 跑进度条,进度条不关联跳转逻辑
*/
private
fun
startProgressJob
()
{
if
(
job
==
null
&&
binding
.
progressBar
.
progress
!=
100
)
{
job
=
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
while
(
isActive
)
{
binding
.
progressBar
.
progress
+=
1
delay
(
150
)
if
(
binding
.
progressBar
.
progress
==
100
)
{
cancel
()
}
}
}
}
}
/**
* 暂停进度条
*/
private
fun
pauseProgressJob
()
{
job
?.
cancel
()
job
=
null
}
override
fun
onPause
()
{
override
fun
onPause
()
{
super
.
onPause
()
super
.
onPause
()
pauseProgressJob
()
splashPresenter
.
pauseJumpJob
()
splashPresenter
.
pauseJumpJob
()
}
}
...
@@ -133,7 +147,6 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
...
@@ -133,7 +147,6 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
updateAppLanguage
(
MyApplication
.
splashLanguage
)
{
updateAppLanguage
(
MyApplication
.
splashLanguage
)
{
MyApplication
.
splashLanguage
=
it
MyApplication
.
splashLanguage
=
it
}
}
startProgressJob
()
splashPresenter
.
startJumpJob
(
lifecycleScope
)
splashPresenter
.
startJumpJob
(
lifecycleScope
)
}
}
...
@@ -145,7 +158,6 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
...
@@ -145,7 +158,6 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
}
}
jump
.
set
(
true
)
jump
.
set
(
true
)
LogEx
.
logDebug
(
TAG
,
"jumpNext"
)
binding
.
progressBar
.
progress
=
100
binding
.
progressBar
.
progress
=
100
binding
.
root
.
postDelayed
({
binding
.
root
.
postDelayed
({
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/ui/splash/SplashPresenter.kt
View file @
bc34ac4c
...
@@ -2,6 +2,7 @@ package com.base.pdfviewerscannerwhite.ui.splash
...
@@ -2,6 +2,7 @@ package com.base.pdfviewerscannerwhite.ui.splash
import
androidx.lifecycle.LifecycleCoroutineScope
import
androidx.lifecycle.LifecycleCoroutineScope
import
com.base.pdfviewerscannerwhite.ads.AdmobHelper.open_ad_loading
import
com.base.pdfviewerscannerwhite.ads.AdmobHelper.open_ad_loading
import
com.base.pdfviewerscannerwhite.bean.ConstObject
import
com.base.pdfviewerscannerwhite.utils.AppPreferences
import
com.base.pdfviewerscannerwhite.utils.AppPreferences
import
com.base.pdfviewerscannerwhite.utils.LogEx
import
com.base.pdfviewerscannerwhite.utils.LogEx
import
kotlinx.coroutines.Job
import
kotlinx.coroutines.Job
...
@@ -17,20 +18,26 @@ class SplashPresenter(
...
@@ -17,20 +18,26 @@ class SplashPresenter(
var
loadingTime
=
AppPreferences
.
getInstance
().
getString
(
open_ad_loading
,
"15"
).
toInt
()
var
loadingTime
=
AppPreferences
.
getInstance
().
getString
(
open_ad_loading
,
"15"
).
toInt
()
var
startJumpJob
:
Boolean
=
false
/**
/**
* 超时跳转
* 超时跳转
*/
*/
fun
startJumpJob
(
lifecycleCoroutineScope
:
LifecycleCoroutineScope
)
{
fun
startJumpJob
(
lifecycleCoroutineScope
:
LifecycleCoroutineScope
)
{
if
(
jumpJob
==
null
)
{
loadingTime
=
30
val
startTime
=
System
.
currentTimeMillis
()
if
(
ConstObject
.
ifAgreePrivacy
&&
startJumpJob
)
{
jumpJob
=
lifecycleCoroutineScope
.
launch
{
if
(
jumpJob
==
null
)
{
LogEx
.
logDebug
(
TAG
,
"open_ad_loading=$loadingTime"
)
val
startTime
=
System
.
currentTimeMillis
()
delay
(
loadingTime
*
1000L
)
jumpJob
=
lifecycleCoroutineScope
.
launch
{
val
endTime
=
System
.
currentTimeMillis
()
LogEx
.
logDebug
(
TAG
,
"open_ad_loading=$loadingTime"
)
LogEx
.
logDebug
(
TAG
,
"超时跳转 time=${endTime - startTime}"
)
delay
(
loadingTime
*
1000L
)
splashView
.
jumpNext
()
val
endTime
=
System
.
currentTimeMillis
()
LogEx
.
logDebug
(
TAG
,
"超时跳转 time=${endTime - startTime}"
)
splashView
.
jumpNext
()
}
}
}
}
}
}
}
/**
/**
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/utils/KotlinExt.kt
View file @
bc34ac4c
package
com.base.pdfviewerscannerwhite.utils
package
com.base.pdfviewerscannerwhite.utils
import
android.content.Context
import
com.base.pdfviewerscannerwhite.R
import
com.base.pdfviewerscannerwhite.bean.ConstObject
import
java.text.SimpleDateFormat
import
java.text.SimpleDateFormat
import
java.time.LocalDate
import
java.time.format.TextStyle
import
java.util.Locale
import
java.util.Locale
object
KotlinExt
{
object
KotlinExt
{
fun
Number
.
toFormatSize
(
count
:
Int
=
1
):
String
{
fun
Number
.
toFormatSize
(
count
:
Int
=
1
):
String
{
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/utils/UmpUtils.kt
View file @
bc34ac4c
...
@@ -4,39 +4,35 @@ import android.app.Activity
...
@@ -4,39 +4,35 @@ import android.app.Activity
import
android.content.Context
import
android.content.Context
import
com.base.pdfviewerscannerwhite.BuildConfig
import
com.base.pdfviewerscannerwhite.BuildConfig
import
com.google.android.ump.ConsentDebugSettings
import
com.google.android.ump.ConsentDebugSettings
import
com.google.android.ump.ConsentForm
import
com.google.android.ump.ConsentInformation
import
com.google.android.ump.ConsentInformation
import
com.google.android.ump.ConsentRequestParameters
import
com.google.android.ump.ConsentRequestParameters
import
com.google.android.ump.FormError
import
com.google.android.ump.FormError
import
com.google.android.ump.UserMessagingPlatform
import
com.google.android.ump.UserMessagingPlatform
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.MainScope
import
kotlinx.coroutines.delay
import
kotlinx.coroutines.launch
object
UmpUtils
{
object
UmpUtils
{
// requireActivity().requestUMP(loadAndShowErrorAction = {
// Toast.makeText(context, "loadAndShowErrorAction", Toast.LENGTH_SHORT).show()
// }, formErrorAction = {
// Toast.makeText(context, "formErrorAction", Toast.LENGTH_SHORT).show()
// },
// dialogAction = {
// Toast.makeText(context, "dialogAction flag=$it", Toast.LENGTH_SHORT).show()
//
// })
private
fun
Context
.
umpTest
():
ConsentDebugSettings
{
private
fun
Context
.
umpTest
():
ConsentDebugSettings
{
val
debugSettings
=
ConsentDebugSettings
.
Builder
(
this
)
val
debugSettings
=
ConsentDebugSettings
.
Builder
(
this
)
debugSettings
.
addTestDeviceHashedId
(
"TEST-DEVICE-HASHED-ID"
)
debugSettings
.
setDebugGeography
(
ConsentDebugSettings
.
DebugGeography
.
DEBUG_GEOGRAPHY_EEA
)
debugSettings
.
addTestDeviceHashedId
(
"33BE2250B43518CCDA7DE426D04EE231"
)
//通过TEST-DEVICE-HASHED-ID log过滤ConsentDebugSettings 打印测试id,使用测试id来测试
// debugSettings.addTestDeviceHashedId("TEST-DEVICE-HASHED-ID")
debugSettings
.
addTestDeviceHashedId
(
"73FE7C2634104D50A11BE9B902AA0FA6"
)
return
debugSettings
.
build
()
return
debugSettings
.
build
()
}
}
private
val
TAG
=
"UmpHelp"
var
callback
:
((
flag
:
Boolean
)
->
Unit
)?
=
null
fun
requestUMP
(
activity
:
Activity
,
loadAndShowErrorAction
:
(()
->
Unit
)?
=
null
,
//加载弹出错误
private
val
TAG
=
"UmpUtils"
formErrorAction
:
(()
->
Unit
)?
=
null
,
//请求错误
dialogAction
:
((
flag
:
Boolean
)
->
Unit
)?
=
null
,
//dialog授权
fun
requestUMP
(
activity
:
Activity
)
{
)
{
var
callBacked
:
Boolean
=
false
val
paramsBuild
=
ConsentRequestParameters
.
Builder
()
val
paramsBuild
=
ConsentRequestParameters
.
Builder
()
...
@@ -49,33 +45,68 @@ object UmpUtils {
...
@@ -49,33 +45,68 @@ object UmpUtils {
paramsBuild
.
setTagForUnderAgeOfConsent
(
false
)
paramsBuild
.
setTagForUnderAgeOfConsent
(
false
)
val
params
=
paramsBuild
.
build
()
val
params
=
paramsBuild
.
build
()
val
consentInformation
=
UserMessagingPlatform
.
getConsentInformation
(
activity
)
val
consentInformation
:
ConsentInformation
=
UserMessagingPlatform
.
getConsentInformation
(
activity
)
if
(
BuildConfig
.
DEBUG
)
{
consentInformation
.
reset
()
}
val
updateSuccessListener
=
ConsentInformation
.
OnConsentInfoUpdateSuccessListener
{
val
updateSuccessListener
=
ConsentInformation
.
OnConsentInfoUpdateSuccessListener
{
UserMessagingPlatform
.
loadAndShowConsentFormIfRequired
(
activity
)
LogEx
.
logDebug
(
TAG
,
"isConsentFormAvailable=${consentInformation.isConsentFormAvailable}"
)
{
loadAndShowError
:
FormError
?
->
if
(
consentInformation
.
isConsentFormAvailable
)
{
if
(
loadAndShowError
!=
null
)
{
MainScope
().
launch
(
Dispatchers
.
Main
)
{
if
(!
callBacked
)
{
delay
(
500
)
callBacked
=
true
loadAndShowConsentFormIfRequired
(
activity
,
consentInformation
)
loadAndShowErrorAction
?.
invoke
()
}
}
else
{
// Consent has been gathered.
// 授权完成,初始化SDK
if
(!
callBacked
)
{
callBacked
=
true
dialogAction
?.
invoke
(
consentInformation
.
canRequestAds
())
}
}
}
}
else
{
callback
?.
invoke
(
false
)
callback
=
null
}
}
}
}
val
updateFailureListener
=
ConsentInformation
.
OnConsentInfoUpdateFailureListener
{
val
updateFailureListener
=
ConsentInformation
.
OnConsentInfoUpdateFailureListener
{
if
(!
callBacked
)
{
LogEx
.
logDebug
(
TAG
,
"message=${it.message} errorCode=${it.errorCode}"
)
callBacked
=
true
callback
?.
invoke
(
false
)
formErrorAction
?.
invoke
()
callback
=
null
}
}
}
consentInformation
.
requestConsentInfoUpdate
(
activity
,
params
,
updateSuccessListener
,
updateFailureListener
)
consentInformation
.
requestConsentInfoUpdate
(
activity
,
params
,
updateSuccessListener
,
updateFailureListener
)
}
}
fun
loadAndShowConsentFormIfRequired
(
activity
:
Activity
,
consentInformation
:
ConsentInformation
)
{
UserMessagingPlatform
.
loadConsentForm
(
activity
,
object
:
UserMessagingPlatform
.
OnConsentFormLoadSuccessListener
{
override
fun
onConsentFormLoadSuccess
(
consentForm
:
ConsentForm
)
{
LogEx
.
logDebug
(
TAG
,
"onConsentFormLoadSuccess"
)
consentForm
.
show
(
activity
)
{
callback
?.
invoke
(
consentInformation
.
canRequestAds
())
callback
=
null
}
}
},
object
:
UserMessagingPlatform
.
OnConsentFormLoadFailureListener
{
override
fun
onConsentFormLoadFailure
(
p0
:
FormError
)
{
//https://groups.google.com/g/google-admob-ads-sdk/c/x-fyDOfMSqU/m/MeZX3mO4AAAJ
LogEx
.
logDebug
(
TAG
,
"onConsentFormLoadFailure ${p0.message} ${p0.errorCode}"
)
callback
?.
invoke
(
consentInformation
.
canRequestAds
())
callback
=
null
}
})
// UserMessagingPlatform.loadAndShowConsentFormIfRequired(activity) { loadAndShowError: FormError? ->
// LogEx.logDebug(
// TAG,
// "loadAndShowConsentFormIfRequired message=${loadAndShowError?.message} errorCode=${loadAndShowError?.errorCode}"
// )
// if (loadAndShowError != null) {
// callback?.invoke(false)
// callback = null
// } else {
// callback?.invoke(consentInformation.canRequestAds())
// callback = null
// }
// }
}
}
}
\ No newline at end of file
app/src/main/res/drawable/progress_bg.xml
View file @
bc34ac4c
...
@@ -3,29 +3,21 @@
...
@@ -3,29 +3,21 @@
<!-- 设置背景色 -->
<!-- 设置背景色 -->
<item
android:id=
"@android:id/background"
>
<item
android:id=
"@android:id/background"
>
<shape>
<shape>
<stroke
<solid
android:color=
"#3300B8DE"
/>
android:width=
"1.5dp"
<corners
android:radius=
"2.5dp"
/>
android:color=
"#00B8DE"
/>
<corners
android:radius=
"8dp"
/>
</shape>
</shape>
</item>
</item>
<!-- 设置进度条颜色 -->
<!-- 设置进度条颜色 -->
<item
<!-- <item android:id="@android:id/progress">-->
android:id=
"@android:id/progress"
<!-- <scale android:scaleWidth="100%">-->
android:bottom=
"3dp"
<!-- <clip>-->
android:end=
"3dp"
<!-- <shape>-->
android:start=
"3dp"
<!-- <corners android:radius="2.5dp" />-->
android:top=
"3dp"
>
<!-- <solid android:color="#00B8DE" />-->
<!-- <scale android:scaleWidth="100%">-->
<!-- </shape>-->
<clip>
<!-- </clip>-->
<shape>
<!-- </scale>-->
<corners
android:radius=
"5dp"
/>
<!-- </item>-->
<solid
android:color=
"#00B8DE"
/>
</shape>
</clip>
<!-- </scale>-->
</item>
</layer-list>
</layer-list>
\ No newline at end of file
app/src/main/res/drawable/splash_bp.xml
View file @
bc34ac4c
...
@@ -4,6 +4,6 @@
...
@@ -4,6 +4,6 @@
<item
<item
android:gravity=
"top|center_horizontal"
android:gravity=
"top|center_horizontal"
android:top=
"220dp"
>
android:top=
"220dp"
>
<bitmap
android:src=
"@mipmap/qdy
logo
"
/>
<bitmap
android:src=
"@mipmap/qdy
ebg
"
/>
</item>
</item>
</layer-list>
</layer-list>
\ No newline at end of file
app/src/main/res/layout/activity_splash_2.xml
0 → 100644
View file @
bc34ac4c
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/main"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/splash_bp"
tools:context=
".ui.splash.SplashActivity"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"25dp"
android:layout_marginTop=
"82dp"
android:src=
"@mipmap/qdylogo"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_xingqi"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"28dp"
android:layout_marginTop=
"180dp"
android:textColor=
"#7D7D7F"
android:textSize=
"20sp"
android:textStyle=
"bold"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:text=
"Wednesday"
/>
<TextView
android:id=
"@+id/tv_month_day"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"31dp"
android:textColor=
"#16151A"
android:textSize=
"45sp"
app:layout_constraintStart_toStartOf=
"@id/tv_xingqi"
app:layout_constraintTop_toBottomOf=
"@id/tv_xingqi"
tools:text=
"October 09"
/>
<View
android:layout_width=
"48dp"
android:layout_height=
"1dp"
android:layout_marginEnd=
"8dp"
android:background=
"#CFCFD0"
app:layout_constraintBottom_toBottomOf=
"@id/tv_app_name"
app:layout_constraintEnd_toStartOf=
"@id/tv_app_name"
app:layout_constraintTop_toTopOf=
"@id/tv_app_name"
/>
<TextView
android:id=
"@+id/tv_app_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"24dp"
android:text=
"@string/app_name"
android:textColor=
"#7D7D7F"
android:textSize=
"20sp"
android:textStyle=
"bold"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.45"
/>
<ImageView
android:id=
"@+id/iv_document"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"27dp"
android:src=
"@mipmap/document_all"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_app_name"
/>
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"25dp"
app:layout_constraintStart_toStartOf=
"@id/iv_document"
app:layout_constraintTop_toBottomOf=
"@id/iv_document"
>
<ProgressBar
android:id=
"@+id/progressBar"
style=
"@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width=
"151dp"
android:layout_height=
"15dp"
android:indeterminate=
"true"
android:indeterminateTint=
"#00B8DE"
android:indeterminateTintMode=
"src_atop"
/>
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/mipmap-xxhdpi/document_all.png
0 → 100644
View file @
bc34ac4c
34.6 KB
app/src/main/res/mipmap-xxhdpi/qdyebg.png
0 → 100644
View file @
bc34ac4c
This diff is collapsed.
Click to expand it.
app/src/main/res/mipmap-xxhdpi/qdylogo.png
View replaced file @
3064c296
View file @
bc34ac4c
50.5 KB
|
W:
|
H:
12.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
app/src/main/res/values/strings.xml
View file @
bc34ac4c
...
@@ -63,5 +63,12 @@
...
@@ -63,5 +63,12 @@
<string
name=
"delete_password_the_file_is_not_password_protected"
>
Delete password, the file is not password protected
</string>
<string
name=
"delete_password_the_file_is_not_password_protected"
>
Delete password, the file is not password protected
</string>
<string
name=
"input_password"
>
Input Password
</string>
<string
name=
"input_password"
>
Input Password
</string>
<string
name=
"password_protected"
>
%1$s password protected
</string>
<string
name=
"password_protected"
>
%1$s password protected
</string>
<string
name=
"sunday"
>
Sunday
</string>
<string
name=
"monday"
>
Monday
</string>
<string
name=
"tuesday"
>
Tuesday
</string>
<string
name=
"wednesday"
>
Wednesday
</string>
<string
name=
"thursday"
>
Thursday
</string>
<string
name=
"friday"
>
Friday
</string>
<string
name=
"saturday"
>
Saturday
</string>
</resources>
</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