Commit 7b265b0a authored by guest's avatar guest

修改迭代需求

parent 526c127b
File added
......@@ -10,21 +10,21 @@ android {
compileSdk 34
defaultConfig {
applicationId "com.kk.cleanmaster.file.cleanmaster.master"
applicationId "confine.scream"
minSdk 24
targetSdk 34
versionCode 1
versionName "1.0"
versionCode 25
versionName "3.4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
setProperty("archivesBaseName", "DumpsterPhotoRecovery-v${versionName}")
}
signingConfigs {
realse {
storeFile file('../smartcl.jks')
storePassword '123456'
keyAlias 'key0'
keyPassword '123456'
storeFile file('../ac.jks')
storePassword 'ac123456'
keyAlias 'ac'
keyPassword 'ac123456'
}
}
buildTypes {
......@@ -125,4 +125,6 @@ dependencies {
//work
implementation("androidx.work:work-runtime-ktx:2.7.1") // 请使用最新版本
implementation 'com.reyun.solar.engine.oversea:solar-engine-core:1.2.8.3'
implementation 'com.reyun.solar.engine:se-plugin-oaid:1.2.8.3'
}
\ No newline at end of file
{
"project_info": {
"project_number": "286059626470",
"project_id": "datarecovery-1311d",
"storage_bucket": "datarecovery-1311d.appspot.com"
"project_number": "135677224109",
"project_id": "scream-1bc70",
"storage_bucket": "scream-1bc70.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:286059626470:android:561dad747cfdbdaac0e027",
"mobilesdk_app_id": "1:135677224109:android:5e3fd3c8cfce99d40a1224",
"android_client_info": {
"package_name": "com.kk.cleanmaster.file.cleanmaster.master"
"package_name": "confine.scream"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDNejLop3k-9tsbSwYe7vhhkq8AW_L2T20"
"current_key": "AIzaSyBIUMrPv6OOQWBheBAylXU94bkwvZgBFsg"
}
],
"services": {
......
......@@ -19,16 +19,45 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn javax.annotation.Nullable
-keep class com.base.filerecoveryrecyclebin.bean.** {*;}
-dontwarn javax.annotation.Nullable
-keep class com.reyun.** {*; }
-keep class route.**{*;}
-keep interface com.reyun.** {*; }
-keep interface route.**{*;}
-dontwarn com.reyun.**
-dontwarn org.json.**
-keep class org.json.**{*;}
# Google lib库
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
java.lang.String getId();
boolean isLimitAdTrackingEnabled();
}
-keep public class com.android.installreferrer.** { *; }
# 如果使用到了获取oaid插件,请添加以下混淆策略
-keep class com.huawei.hms.**{*;}
-keep class com.hihonor.**{*;}
-dontwarn javax.annotation.Nullable
-keep class aid.halcyon.sip.fare.** {*;}
-dontoptimize
-keepattributes Signature
-keep class com.squareup.okhttp.** { *; }
-keep class com.google.gson.reflect.** { *; }
-keepattributes *Annotation*
-keep class * extends com.google.gson.TypeAdapter
-keep class * extends com.google.gson.JsonSerializer
-keep class * extends com.google.gson.Deserializer
-keep class com.google.gson.TypeAdapters{*;}
-keep class com.google.gson.stream.** { *; }
-keep class com.google.gson.** { *; }
-keep class com.alibaba.idst.** { *; }
-keep class * extends com.google.gson.reflect.TypeToken
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.examples.android.model.** { *; }
-keepattributes AnnotationDefault, RuntimeVisibleAnnotations
-keep class com.bytedance.sdk.** { *; }
-dontwarn com.google.android.gms.ads.R$layout
-dontwarn com.google.android.gms.ads.R$styleable
\ No newline at end of file
......@@ -40,7 +40,6 @@
<activity
android:name=".activity.splash.Splash2Activity"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/splash.theme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......@@ -238,8 +237,22 @@
android:launchMode="singleTop"
android:screenOrientation="portrait"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity android:name=".activity.junkclean.ScanJunk2Activity"
android:screenOrientation="portrait"/>
<activity
android:name=".fragment.WebBrowserActivity"
android:screenOrientation="portrait" />
<activity
android:name=".activity.junkclean.ScanJunk2Activity"
android:screenOrientation="portrait" />
<activity
android:name=".view.WeatherInterface"
android:screenOrientation="portrait" />
<activity
android:name=".activity.guide.CleanGuideActivity"
android:screenOrientation="portrait" />
<activity
android:name=".activity.XzLoadingActivity"
android:screenOrientation="portrait" />
<meta-data
android:name="com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION"
android:value="true" />
......@@ -250,9 +263,9 @@
android:name="com.google.android.gms.ads.flag.NATIVE_AD_DEBUGGER_ENABLED"
android:value="false" />
<!-- 常驻通知栏 -->
<!-- <service-->
<!-- android:name=".service.StayNotificationService"-->
<!-- android:foregroundServiceType="dataSync" />-->
<!-- <service-->
<!-- android:name=".service.StayNotificationService"-->
<!-- android:foregroundServiceType="dataSync" />-->
<service
android:name=".service.StayJobService"
android:exported="false"
......@@ -260,8 +273,8 @@
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:directBootAware="true"
android:name=".fcm.MessagingService"
android:directBootAware="true"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
......@@ -283,7 +296,6 @@
</provider>
<!-- 添加以下接收器 -->
<!-- 注册广播 -->
<receiver
......
......@@ -14,18 +14,23 @@ import com.base.filerecoveryrecyclebin.fcm.ScreenStatusReceiver
import com.base.filerecoveryrecyclebin.help.BaseApplication
import com.base.filerecoveryrecyclebin.help.BlackUtils
import com.base.filerecoveryrecyclebin.help.ConfigHelper
import com.base.filerecoveryrecyclebin.utils.ActivityManagerUtils
import com.base.filerecoveryrecyclebin.utils.AppPreferences
import com.base.filerecoveryrecyclebin.help.InstallHelps
import com.base.filerecoveryrecyclebin.service.StayJobService.Companion.startJob
import com.base.filerecoveryrecyclebin.utils.ActivityManagerUtils
import com.base.filerecoveryrecyclebin.utils.AppPreferences
import com.base.filerecoveryrecyclebin.utils.EventUtils
import com.base.filerecoveryrecyclebin.utils.LogEx
import com.base.filerecoveryrecyclebin.work.schedulePeriodicWork
import com.facebook.FacebookSdk
import com.google.android.gms.ads.identifier.AdvertisingIdClient
import com.reyun.solar.engine.OnAttributionListener
import com.reyun.solar.engine.SolarEngineConfig
import com.reyun.solar.engine.SolarEngineManager
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.async
import kotlinx.coroutines.launch
import org.json.JSONObject
import java.util.UUID
class MyApplication : BaseApplication() {
......@@ -79,7 +84,7 @@ class MyApplication : BaseApplication() {
}
if (ifAgreePrivacy) {
solarInit()
MainScope().launch(Dispatchers.Main) {
val deferred = async(Dispatchers.IO) {
......@@ -191,5 +196,31 @@ class MyApplication : BaseApplication() {
})
}
private fun solarInit(){
SolarEngineManager.getInstance().preInit(context, "413882174e882211")
val config = SolarEngineConfig.Builder()
// .logEnabled() //开启本地调试日志
.build()
SolarEngineManager.getInstance().initialize(
context, "413882174e882211", config
) { code ->
if (code == 0) {
//初始化成功
config.setOnAttributionListener(object : OnAttributionListener {
override fun onAttributionSuccess(attribution: JSONObject) {
//获取归因结果成功时执行的动作
// Log.e("MXL", "onAttributionSuccess: "+attribution.toString() )
EventUtils.event("source_atrribute", ext = attribution)
}
override fun onAttributionFail(errorCode: Int) {
//获取归因结果失败时执行的动作
// Log.e("MXL", "onAttributionFail: "+errorCode )
}
})
} else {
//初始化失败,具体失败原因参考下方code码释义
}
}
}
}
\ No newline at end of file
......@@ -22,6 +22,7 @@ import com.base.filerecoveryrecyclebin.bean.ConstObject.APP_PROCESS
import com.base.filerecoveryrecyclebin.bean.ConstObject.BATTERY_INFO
import com.base.filerecoveryrecyclebin.bean.ConstObject.JUNK_CLEANER
import com.base.filerecoveryrecyclebin.bean.ConstObject.LARGE_FILE
import com.base.filerecoveryrecyclebin.bean.ConstObject.RECOVERY_AUDIOS
import com.base.filerecoveryrecyclebin.bean.ConstObject.RECOVERY_DOCUMENTS
import com.base.filerecoveryrecyclebin.bean.ConstObject.RECOVERY_PHOTOS
import com.base.filerecoveryrecyclebin.bean.ConstObject.RECOVERY_VIDEOS
......@@ -32,16 +33,16 @@ import com.base.filerecoveryrecyclebin.bean.ConstObject.SCAN_PHOTOS
import com.base.filerecoveryrecyclebin.bean.ConstObject.SCAN_VIDEOS
import com.base.filerecoveryrecyclebin.bean.ConstObject.SCREENSHOT_CLEANER
import com.base.filerecoveryrecyclebin.bean.ConstObject.WHATSAPP_CLEANER
import com.base.filerecoveryrecyclebin.databinding.ActivityLayoutResultBinding
import com.base.filerecoveryrecyclebin.databinding.LayoutResult2Binding
import com.base.filerecoveryrecyclebin.help.BaseActivity
import com.base.filerecoveryrecyclebin.help.KotlinExt.toFormatSize
import com.base.filerecoveryrecyclebin.utils.BarUtils
import com.base.filerecoveryrecyclebin.utils.AppPreferences
import com.base.filerecoveryrecyclebin.utils.BarUtils
class ResultActivity : BaseActivity<ActivityLayoutResultBinding>() {
class ResultActivity : BaseActivity<LayoutResult2Binding>() {
override val binding: ActivityLayoutResultBinding by lazy {
ActivityLayoutResultBinding.inflate(layoutInflater)
override val binding: LayoutResult2Binding by lazy {
LayoutResult2Binding.inflate(layoutInflater)
}
private lateinit var adapter: AppFunctionAdapter
......@@ -49,12 +50,35 @@ class ResultActivity : BaseActivity<ActivityLayoutResultBinding>() {
override fun initView() {
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
binding.clTop.updatePadding(top = BarUtils.getStatusBarHeight())
adapter = AppFunctionAdapter {
adapter = AppFunctionAdapter(this) {
when (it) {
JUNK_CLEANER -> {
startActivity(Intent(this, ScanJunkActivity::class.java))
}
APP_MANAGER -> {
startActivity(Intent(this, AppManagerAnimationActivity::class.java))
}
BATTERY_INFO -> {
startActivity(Intent(this, BatteryInfoAnimationActivity::class.java))
}
LARGE_FILE -> {
startActivity(Intent(this, LargeFileAnimationActivity::class.java))
}
WHATSAPP_CLEANER -> {
startActivity(Intent(this, WhatsAppCleanerAnimationActivity::class.java))
}
APP_PROCESS -> {
startActivity(Intent(this, AppProcessAnimationActivity::class.java))
}
REPEAT_PHOTOS -> {
startActivity(Intent(this, RepeatAnimationActivity::class.java))
}
SCREENSHOT_CLEANER -> {
startActivity(Intent(this, ScreenShotAnimationActivity::class.java))
}
RECOVERY_PHOTOS -> {
......@@ -74,35 +98,15 @@ class ResultActivity : BaseActivity<ActivityLayoutResultBinding>() {
putExtra("ScanType", SCAN_DOCUMENTS)
})
}
REPEAT_PHOTOS -> {
startActivity(Intent(this, RepeatAnimationActivity::class.java))
RECOVERY_AUDIOS->{
startActivity(Intent(this, FileScanResultActivity::class.java).apply {
putExtra("ScanType", ConstObject.SCAN_AUDIOS)
})
}
SCREENSHOT_CLEANER -> {
startActivity(Intent(this, ScreenShotAnimationActivity::class.java))
}
WHATSAPP_CLEANER -> {
startActivity(Intent(this, WhatsAppCleanerAnimationActivity::class.java))
}
APP_PROCESS -> {
startActivity(Intent(this, AppProcessAnimationActivity::class.java))
}
APP_MANAGER -> {
startActivity(Intent(this, AppManagerAnimationActivity::class.java))
}
LARGE_FILE -> {
startActivity(Intent(this, LargeFileAnimationActivity::class.java))
}
BATTERY_INFO -> {
startActivity(Intent(this, BatteryInfoAnimationActivity::class.java))
}
}
finish()
}
......@@ -120,7 +124,8 @@ class ResultActivity : BaseActivity<ActivityLayoutResultBinding>() {
} else {
binding.tvInfo.text = "No junk files found."
}
AppPreferences.getInstance().put("last_use_junk_cleaner", System.currentTimeMillis())
AppPreferences.getInstance()
.put("last_use_junk_cleaner", System.currentTimeMillis())
}
WHATSAPP_CLEANER -> {
......@@ -144,7 +149,10 @@ class ResultActivity : BaseActivity<ActivityLayoutResultBinding>() {
val s = AppPreferences.getInstance().getString("isShowBackIntAd", "0").toIntOrNull()
?: 0
if (s == 1) {
AdmobMaxHelper.admobMaxShowInterstitialAd(this@ResultActivity, isLoading = false) {
AdmobMaxHelper.admobMaxShowInterstitialAd(
this@ResultActivity,
isLoading = false
) {
finishToMain()
}
} else {
......@@ -157,11 +165,11 @@ class ResultActivity : BaseActivity<ActivityLayoutResultBinding>() {
onBackPressedDispatcher.onBackPressed()
}
AdmobMaxHelper.admobMaxShowNativeAd(this@ResultActivity, binding.flAd, 0)
// AdmobMaxHelper.admobMaxShowNativeAd(this@ResultActivity, binding.flAd, 0)
}
override fun onDestroy() {
super.onDestroy()
binding.icSuccess.clearAnimation()
// binding.icSuccess.clearAnimation()
}
}
\ No newline at end of file
package com.base.filerecoveryrecyclebin.activity
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.net.Uri
......@@ -13,8 +16,6 @@ import com.base.filerecoveryrecyclebin.help.BaseActivity
import com.base.filerecoveryrecyclebin.help.ConfigHelper
import com.base.filerecoveryrecyclebin.service.StayJobService
import com.base.filerecoveryrecyclebin.service.StayJobService.Companion.startJob
import com.base.filerecoveryrecyclebin.service.StayNotificationService
import com.base.filerecoveryrecyclebin.service.StayNotificationService.Companion.startStayNotification
import com.base.filerecoveryrecyclebin.utils.BarUtils
import com.base.filerecoveryrecyclebin.view.RateStarPop.showRateStarPopDialog
......@@ -27,19 +28,20 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
override fun initView() {
BarUtils.setStatusBarLightMode(this, true)
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
binding.switchStayNotification.isChecked = stayNotification
binding.switchFcmNotification.isChecked = fcmNotification
}
override fun initListener() {
onBackPressedDispatcher.addCallback {
// copyText(this@SettingActivity, AppPreferences.getInstance().getString("token",""))
finishToMain()
}
binding.flBack.setOnClickListener {
onBackPressedDispatcher.onBackPressed()
}
binding.switchStayNotification.setOnCheckedChangeListener { buttonView, isChecked ->
stayNotification = isChecked
if (isChecked) {
......@@ -67,11 +69,19 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
Uri.parse(ConfigHelper.privacyPolicy)
)
startActivity(intent)
// NotificationUtil.sendNotification(this, ConstObject.ID_WHEATHER)
}
binding.llScore.setOnClickListener {
showRateStarPopDialog(mustShow = true)
// NotificationUtil.sendNotification(this, ConstObject.ID_XINGZUO)
}
}
fun copyText(context: Context, text: String?) {
val clipboardManager: ClipboardManager =
context.getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
val clip = ClipData.newPlainText("simple text", text)
clipboardManager.setPrimaryClip(clip)
}
}
\ No newline at end of file
package com.base.filerecoveryrecyclebin.activity
import android.animation.ValueAnimator
import android.content.Intent
import android.graphics.Color
import android.view.animation.LinearInterpolator
import android.widget.Toast
import androidx.activity.addCallback
import androidx.lifecycle.lifecycleScope
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.databinding.ActivityLayoutXingzuoLoadingBinding
import com.base.filerecoveryrecyclebin.fragment.WebBrowserActivity
import com.base.filerecoveryrecyclebin.help.BaseActivity
import com.base.filerecoveryrecyclebin.utils.BarUtils
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlin.random.Random
class XzLoadingActivity : BaseActivity<ActivityLayoutXingzuoLoadingBinding>() {
override val binding: ActivityLayoutXingzuoLoadingBinding by lazy {
ActivityLayoutXingzuoLoadingBinding.inflate(layoutInflater)
}
override fun initView() {
BarUtils.setStatusBarLightMode(this,false)
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
AdmobMaxHelper.admobMaxShowNativeAd(this,binding.idFlNative)
ValueAnimator.ofFloat(0f, 360f).apply {
duration = 1100
repeatMode = ValueAnimator.RESTART
repeatCount = ValueAnimator.INFINITE
interpolator = LinearInterpolator()
addUpdateListener { binding.idZhuan.rotation = it.animatedValue as Float }
start()
}
}
override fun initListener() {
onBackPressedDispatcher.addCallback {
Toast.makeText(this@XzLoadingActivity, "wait a moment", Toast.LENGTH_SHORT).show()
}
}
private var isPasue = false
override fun onPause() {
super.onPause()
isPasue = false
}
override fun onResume() {
super.onResume()
isPasue = true
playAnimal()
}
private fun playAnimal() {
lifecycleScope.launch(Dispatchers.Main) {
binding.root.postDelayed({
animaEnd()
}, Random.nextLong(3000, 5000))
}
}
private fun animaEnd(){
if (isPasue) {
AdmobMaxHelper.admobMaxShowInterstitialAd(this){
startActivity(Intent(this, WebBrowserActivity::class.java).apply {
putExtra("url", "https://www.horoscope.com/us/index.aspx")
})
finish()
}
}
}
}
......@@ -13,13 +13,11 @@ import androidx.core.view.updatePadding
import androidx.lifecycle.lifecycleScope
import com.base.filerecoveryrecyclebin.adapter.AppManagerAdapter
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.ads.admob.AdmobInterstitialUtils
import com.base.filerecoveryrecyclebin.bean.AppBean
import com.base.filerecoveryrecyclebin.databinding.ActivityAppManagerBinding
import com.base.filerecoveryrecyclebin.help.BaseActivity
import com.base.filerecoveryrecyclebin.utils.BarUtils
import com.base.filerecoveryrecyclebin.utils.RamUtils.ramPair
import com.base.filerecoveryrecyclebin.view.DialogViews.showDeletePermanentlyDialog
import com.base.filerecoveryrecyclebin.view.DialogViews.showExitFunctionDialog
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
......@@ -82,7 +80,7 @@ class AppManagerActivity : BaseActivity<ActivityAppManagerBinding>() {
override fun initListener() {
super.initListener()
onBackPressedDispatcher.addCallback {
showExitFunctionDialog{showAd ->
showExitFunctionDialog(this@AppManagerActivity){showAd ->
if (showAd){
AdmobMaxHelper.admobMaxShowInterstitialAd(this@AppManagerActivity, isLoading = false) {
finishToMain()
......
......@@ -24,6 +24,7 @@ class AppManagerAnimationActivity : BaseActivity<ActivityAppProcessAnimationBind
override fun initView() {
playLottie()
AdmobMaxHelper.admobMaxShowNativeAd(this,binding.idFlNative)
}
override fun initListener() {
......
......@@ -24,6 +24,7 @@ class AppProcessAnimationActivity : BaseActivity<ActivityAppProcessAnimationBind
override fun initView() {
playLottie()
AdmobMaxHelper.admobMaxShowNativeAd(this,binding.idFlNative)
}
override fun initListener() {
......
......@@ -63,7 +63,7 @@ class BatteryActivity : BaseActivity<ActivityBatteryBinding>() {
override fun initListener() {
super.initListener()
onBackPressedDispatcher.addCallback {
showExitFunctionDialog { showAd ->
showExitFunctionDialog(this@BatteryActivity) { showAd ->
if (showAd) {
AdmobMaxHelper.admobMaxShowInterstitialAd(this@BatteryActivity) {
finishToMain()
......
......@@ -23,6 +23,7 @@ class BatteryInfoAnimationActivity : BaseActivity<ActivityBatteryInfoAnimationBi
private var job: Job? = null
override fun initView() {
AdmobMaxHelper.admobMaxShowNativeAd(this,binding.idFlNative)
resumeLottie()
}
......
package com.base.filerecoveryrecyclebin.activity.guide
import android.content.Intent
import android.graphics.Color
import androidx.core.view.isVisible
import androidx.core.view.updatePadding
import com.base.filerecoveryrecyclebin.activity.MainActivity
import com.base.filerecoveryrecyclebin.activity.junkclean.ScanJunkActivity
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.bean.ConstObject.isCLeanGuide
import com.base.filerecoveryrecyclebin.databinding.ActivityLayoutCleanGuideBinding
import com.base.filerecoveryrecyclebin.help.BaseActivity
import com.base.filerecoveryrecyclebin.utils.BarUtils
import kotlin.random.Random
class CleanGuideActivity : BaseActivity<ActivityLayoutCleanGuideBinding>() {
override val binding: ActivityLayoutCleanGuideBinding by lazy {
ActivityLayoutCleanGuideBinding.inflate(layoutInflater)
}
override fun initView() {
BarUtils.setStatusBarLightMode(this, true)
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
loadPro()
isCLeanGuide=true
AdmobMaxHelper.admobMaxShowNativeAd(this,binding.idFlNative)
}
override fun initListener() {
binding.idClean.setOnClickListener {
startActivity(Intent(this, ScanJunkActivity::class.java))
finish()
}
binding.idTvSkip.setOnClickListener {
startActivity(Intent(this, MainActivity::class.java))
finish()
}
}
private var mProess = 0
private fun loadPro() {
if (mProess >= 100) {
binding.idProcess.progress = mProess
binding.idLl01.isVisible=false
binding.idLl02.isVisible=true
binding.idTvSkip.isVisible=true
return
}
binding.root.postDelayed(Runnable {
mProess += Random.nextInt(5)
binding.idProcess.progress = mProess
loadPro()
}, 80)
}
}
\ No newline at end of file
package com.base.filerecoveryrecyclebin.activity.guide
import android.content.Intent
import android.graphics.Color
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import androidx.viewpager2.widget.ViewPager2
import com.base.filerecoveryrecyclebin.R
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.databinding.ActivityGuideBinding
import com.base.filerecoveryrecyclebin.fragment.GuideFragment
import com.base.filerecoveryrecyclebin.help.BaseActivity
import com.base.filerecoveryrecyclebin.help.PermissionHelp.requestStorePermission
import com.base.filerecoveryrecyclebin.utils.BarUtils
import com.zhpan.indicator.enums.IndicatorSlideMode
import com.zhpan.indicator.enums.IndicatorStyle
......@@ -21,8 +24,11 @@ class GuideActivity : BaseActivity<ActivityGuideBinding>() {
private val page2: GuideFragment by lazy {
GuideFragment().apply { page = 2 }
}
private val page3: GuideFragment by lazy {
GuideFragment().apply { page = 3 }
}
private val fragments by lazy {
mutableListOf(page1, page2)
mutableListOf(page1, page2, page3)
}
......@@ -38,7 +44,7 @@ class GuideActivity : BaseActivity<ActivityGuideBinding>() {
override fun initView() {
BarUtils.setStatusBarLightMode(this, true)
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
AdmobMaxHelper.admobMaxShowNativeAd(this, binding.idFlNative)
binding.viewpager2.run {
adapter = object : FragmentStateAdapter(this@GuideActivity) {
override fun getItemCount(): Int {
......@@ -67,4 +73,11 @@ class GuideActivity : BaseActivity<ActivityGuideBinding>() {
.setupWithViewPager(binding.viewpager2)
}
fun lauchPermisson() {
startActivity(Intent(this, CleanGuideActivity::class.java))
finish()
requestStorePermission(launcher) {
}
}
}
\ No newline at end of file
......@@ -50,7 +50,7 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
BarUtils.setStatusBarLightMode(this, true)
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
// binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
AdmobMaxHelper.admobMaxShowNativeAd(this,binding.idFlNative)
junkExpandAdapter = JunkExpandAdapter { size ->
if (size == 0L) {
binding.tvBtn.text = "Got it"
......@@ -95,7 +95,7 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
}
onBackPressedDispatcher.addCallback(object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
showExitFunctionDialog {
showExitFunctionDialog(this@CleanJunkActivity) {
if (it) {
AdmobMaxHelper.admobMaxShowInterstitialAd(this@CleanJunkActivity, isLoading = false) {
finishToMain()
......
......@@ -10,6 +10,7 @@ import android.widget.Toast
import androidx.activity.addCallback
import androidx.core.view.updatePadding
import androidx.lifecycle.lifecycleScope
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper.admobMaxShowInterstitialAd
import com.base.filerecoveryrecyclebin.databinding.ActivityLayoutScanJunkBinding
import com.base.filerecoveryrecyclebin.help.BaseActivity
......@@ -36,7 +37,7 @@ class ScanJunkActivity : BaseActivity<ActivityLayoutScanJunkBinding>() {
override fun initView() {
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
AdmobMaxHelper.admobMaxShowNativeAd(this,binding.idFlNative)
if (!checkStorePermission()) {
showGerPermission(tittle = "Storage Permission Required",
desc = "This feature requires access to your storage to scan your files and clean up junk files and unused APK files. We will not transmit your data to any third-party service. Please grant permission so that we can provide you with better service.",
......
......@@ -73,7 +73,7 @@ class LargeFileActivity : BaseActivity<ActivityLargeFileBinding>() {
override fun initListener() {
super.initListener()
onBackPressedDispatcher.addCallback {
showExitFunctionDialog { show ->
showExitFunctionDialog(this@LargeFileActivity) { show ->
if (show) {
AdmobMaxHelper.admobMaxShowInterstitialAd(this@LargeFileActivity, isLoading = false) {
finishToMain()
......
......@@ -23,6 +23,7 @@ class LargeFileAnimationActivity : BaseActivity<ActivityLargeFileAnimationBindin
private var job: Job? = null
override fun initView() {
AdmobMaxHelper.admobMaxShowNativeAd(this,binding.idFlNative)
}
override fun initListener() {
......
......@@ -10,7 +10,6 @@ import androidx.core.view.isVisible
import androidx.lifecycle.lifecycleScope
import com.base.filerecoveryrecyclebin.adapter.FileFolderAdapter
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.ads.admob.AdmobInterstitialUtils
import com.base.filerecoveryrecyclebin.bean.ConstObject.SCAN_AUDIOS
import com.base.filerecoveryrecyclebin.bean.ConstObject.SCAN_DOCUMENTS
import com.base.filerecoveryrecyclebin.bean.ConstObject.SCAN_PHOTOS
......@@ -106,7 +105,7 @@ class FileScanResultActivity : BaseActivity<ActivityFileScanResultBinding>() {
onBackPressedDispatcher.onBackPressed()
}
onBackPressedDispatcher.addCallback {
showExitFunctionDialog {
showExitFunctionDialog(this@FileScanResultActivity) {
if (it) {
AdmobMaxHelper.admobMaxShowInterstitialAd(this@FileScanResultActivity, isLoading = false) {
finishToMain()
......
......@@ -21,7 +21,7 @@ class RepeatAnimationActivity : BaseActivity<ActivityRepeatAnimationBinding>() {
private var job: Job? = null
override fun initView() {
AdmobMaxHelper.admobMaxShowNativeAd(this,binding.idFlNative)
}
override fun initListener() {
......
......@@ -27,11 +27,9 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async
import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch
import kotlinx.coroutines.withTimeout
import java.io.File
import java.text.SimpleDateFormat
import java.util.Locale
import kotlin.collections.HashSet
class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
......@@ -104,7 +102,7 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
onBackPressedDispatcher.onBackPressed()
}
onBackPressedDispatcher.addCallback {
showExitFunctionDialog {
showExitFunctionDialog(this@ScreenShotActivity) {
if (it) {
AdmobMaxHelper.admobMaxShowInterstitialAd(this@ScreenShotActivity, isLoading = false) {
finishToMain()
......
......@@ -23,7 +23,7 @@ class ScreenShotAnimationActivity : BaseActivity<ActivityScreenShotAnimationBind
private var job: Job? = null
override fun initView() {
AdmobMaxHelper.admobMaxShowNativeAd(this,binding.idFlNative)
}
private fun jumpJob() = lifecycleScope.launch {
......
......@@ -4,6 +4,7 @@ import android.app.Activity
import android.content.Intent
import android.util.Log
import com.base.filerecoveryrecyclebin.activity.MainActivity
import com.base.filerecoveryrecyclebin.activity.XzLoadingActivity
import com.base.filerecoveryrecyclebin.activity.appmanager.AppManagerAnimationActivity
import com.base.filerecoveryrecyclebin.activity.appprocess.AppProcessAnimationActivity
import com.base.filerecoveryrecyclebin.activity.battery.BatteryInfoAnimationActivity
......@@ -23,7 +24,10 @@ import com.base.filerecoveryrecyclebin.bean.ConstObject.ID_RECOVERY_VIDEOS
import com.base.filerecoveryrecyclebin.bean.ConstObject.ID_SCREENSHOT_CLEAN
import com.base.filerecoveryrecyclebin.bean.ConstObject.ID_SIMILAR_IMAGE
import com.base.filerecoveryrecyclebin.bean.ConstObject.ID_WHATSAPP
import com.base.filerecoveryrecyclebin.bean.ConstObject.ID_WHEATHER
import com.base.filerecoveryrecyclebin.bean.ConstObject.ID_XINGZUO
import com.base.filerecoveryrecyclebin.bean.ConstObject.isGuide
import com.base.filerecoveryrecyclebin.view.WeatherInterface
object StartUtils {
......@@ -80,6 +84,12 @@ object StartUtils {
ID_BATTERY_INFO -> {
context.startActivity(Intent(context, BatteryInfoAnimationActivity::class.java))
}
ID_XINGZUO->{
context.startActivity(Intent(context, XzLoadingActivity::class.java))
}
ID_WHEATHER->{
context.startActivity(Intent(context, WeatherInterface::class.java))
}
//================================被动广播=========================================
......
......@@ -118,7 +118,7 @@ class WhatsAppCleanerActivity : BaseActivity<ActivityWhatsAppCleanerBinding>() {
}
private fun showInterstitialAdAndFinish() {
showExitFunctionDialog { showAd ->
showExitFunctionDialog(this) { showAd ->
if (showAd) {
AdmobMaxHelper.admobMaxShowInterstitialAd(this, false) {
finishToMain()
......
......@@ -14,7 +14,6 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlin.random.Random
class WhatsAppCleanerAnimationActivity : BaseActivity<ActivityWhatsAppCleanerAnimationBinding>() {
......@@ -27,6 +26,7 @@ class WhatsAppCleanerAnimationActivity : BaseActivity<ActivityWhatsAppCleanerAni
private var job: Job? = null
override fun initView() {
playLottie()
AdmobMaxHelper.admobMaxShowNativeAd(this,binding.idFlNative)
}
override fun initListener() {
......
......@@ -9,7 +9,6 @@ import com.base.filerecoveryrecyclebin.activity.ResultActivity
import com.base.filerecoveryrecyclebin.adapter.WhatsAppMediaAdapter
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.ads.admob.AdmobInterstitialUtils
import com.base.filerecoveryrecyclebin.ads.admob.AdmobNativeUtils
import com.base.filerecoveryrecyclebin.bean.ConstObject
import com.base.filerecoveryrecyclebin.bean.MediaBean
import com.base.filerecoveryrecyclebin.databinding.ActivityWhatsAppMessageCleanBinding
......@@ -70,7 +69,7 @@ class WhatsAppMessageCleanActivity : BaseActivity<ActivityWhatsAppMessageCleanBi
onBackPressedDispatcher.onBackPressed()
}
onBackPressedDispatcher.addCallback {
showExitFunctionDialog { showAd ->
showExitFunctionDialog(this@WhatsAppMessageCleanActivity) { showAd ->
if (showAd) {
AdmobMaxHelper.admobMaxShowInterstitialAd(this@WhatsAppMessageCleanActivity, isLoading = false) {
finishToMain()
......
package com.base.filerecoveryrecyclebin.adapter
import android.annotation.SuppressLint
import android.app.Activity
import android.view.View
import android.view.ViewGroup
import androidx.core.content.ContextCompat
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.ViewHolder
import com.base.filerecoveryrecyclebin.R
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.bean.ConstObject.APP_MANAGER
import com.base.filerecoveryrecyclebin.bean.ConstObject.APP_PROCESS
import com.base.filerecoveryrecyclebin.bean.ConstObject.BATTERY_INFO
import com.base.filerecoveryrecyclebin.bean.ConstObject.JUNK_CLEANER
import com.base.filerecoveryrecyclebin.bean.ConstObject.LARGE_FILE
import com.base.filerecoveryrecyclebin.bean.ConstObject.PRIVACY_SPACE
import com.base.filerecoveryrecyclebin.bean.ConstObject.RECOVERY_AUDIOS
import com.base.filerecoveryrecyclebin.bean.ConstObject.RECOVERY_DOCUMENTS
import com.base.filerecoveryrecyclebin.bean.ConstObject.RECOVERY_PHOTOS
import com.base.filerecoveryrecyclebin.bean.ConstObject.RECOVERY_VIDEOS
import com.base.filerecoveryrecyclebin.bean.ConstObject.REPEAT_PHOTOS
import com.base.filerecoveryrecyclebin.bean.ConstObject.SCREENSHOT_CLEANER
import com.base.filerecoveryrecyclebin.bean.ConstObject.WHATSAPP_CLEANER
import com.base.filerecoveryrecyclebin.databinding.ItemResultFun2Binding
import com.base.filerecoveryrecyclebin.databinding.ItemLayoutReslut2Binding
import com.base.filerecoveryrecyclebin.utils.AppPreferences
import com.base.filerecoveryrecyclebin.view.XmlEx.inflate
import java.util.Collections
class AppFunctionAdapter(val click: (name: String) -> Unit) :
class AppFunctionAdapter(val activity:Activity,val click: (name: String) -> Unit) :
RecyclerView.Adapter<AppFunctionAdapter.JJJ>() {
val list = arrayListOf(
Fun(JUNK_CLEANER, R.mipmap.clean),
Fun(RECOVERY_PHOTOS, R.mipmap.photos_ss),
Fun(RECOVERY_VIDEOS, R.mipmap.videos_ss),
Fun(RECOVERY_DOCUMENTS, R.mipmap.documents_ss),
Fun(REPEAT_PHOTOS, R.mipmap.repeatedphotos),
Fun(SCREENSHOT_CLEANER, R.mipmap.screenshots),
Fun(WHATSAPP_CLEANER, R.mipmap.h_whatsapp),
Fun(APP_PROCESS, R.mipmap.h_process),
Fun(APP_MANAGER, R.mipmap.c_appmanager),
Fun(LARGE_FILE, R.mipmap.c_large),
Fun(BATTERY_INFO, R.mipmap.c_battery),
Fun(JUNK_CLEANER, R.mipmap.r_laji, "Clean up the junk files for your phone", "Clean Up Now"),
Fun(APP_MANAGER, R.mipmap.r_appjincheng, "Detect junk files ,cache,temp files.", "Try It Now"),
Fun(BATTERY_INFO, R.mipmap.r_dianchi, "View battery usage and details", "Try It Now"),
Fun(LARGE_FILE, R.mipmap.r_dawenjian, "Clean large fles to free up storage space", "Try It Now"),
Fun(WHATSAPP_CLEANER, R.mipmap.r_what, "Free up space by cleaning up WhatsApp junk files", "Try It Now"),
Fun(APP_PROCESS, R.mipmap.r_guanli, "Manage backend processes", "Try It Now"),
Fun(REPEAT_PHOTOS, R.mipmap.r_xiangsi, "Check similar photos to release more space", "Try It Now"),
Fun(SCREENSHOT_CLEANER, R.mipmap.r_jietu, "Check the screenshots to free up more space", "Try It Now"),
Fun(RECOVERY_PHOTOS, R.mipmap.r_pic, "Recovery lost photos", "Try It Now"),
Fun(RECOVERY_VIDEOS, R.mipmap.r_shiping, "Recovery lost videos", "Try It Now"),
Fun(RECOVERY_AUDIOS, R.mipmap.r_yinping, "Recovery lost audios", "Try It Now"),
Fun(RECOVERY_DOCUMENTS, R.mipmap.r_xiazai, "Recovery lost Documents", "Try It Now"),
)
class JJJ(view: View) : ViewHolder(view)
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): JJJ {
return JJJ(R.layout.item_result_fun_2.inflate(parent))
return JJJ(R.layout.item_layout_reslut2.inflate(parent))
}
override fun getItemCount(): Int {
......@@ -55,9 +59,18 @@ class AppFunctionAdapter(val click: (name: String) -> Unit) :
override fun onBindViewHolder(holder: JJJ, position: Int) {
val data = list[position]
val context = holder.itemView.context
val binding = ItemResultFun2Binding.bind(holder.itemView)
val binding = ItemLayoutReslut2Binding.bind(holder.itemView)
if(position==0){
binding.idFlNative.isVisible = true
AdmobMaxHelper.admobMaxShowNativeAd(activity,binding.idFlNative)
}else {
binding.idFlNative.isVisible = false
}
binding.ivIcon.setImageDrawable(ContextCompat.getDrawable(context, data.icon))
binding.tvTittle.text = data.name
binding.idDesc.text=data.des
binding.idBtn.text=data.button
// binding.tvDes.text = data.des
// binding.tvButton.text = data.button
binding.root.setOnClickListener {
......
......@@ -3,6 +3,7 @@ package com.base.filerecoveryrecyclebin.ads
import android.app.Activity
import android.util.Log
import android.view.ViewGroup
import com.base.filerecoveryrecyclebin.R
import com.base.filerecoveryrecyclebin.ads.admob.AdmobInterstitialUtils
import com.base.filerecoveryrecyclebin.ads.admob.AdmobNativeUtils
import com.base.filerecoveryrecyclebin.ads.admob.AdmobOpenUtils
......@@ -72,7 +73,11 @@ object AdmobMaxHelper {
//展示广告关闭时赋值
var lastShowedOnHiddenTime = 0L
fun admobMaxShowInterstitialAd(activity: Activity, isLoading: Boolean = true, onHidden: (() -> Unit)? = null) {
fun admobMaxShowInterstitialAd(
activity: Activity,
isLoading: Boolean = true,
onHidden: (() -> Unit)? = null
) {
if (isBlack) {
EventUtils.event("ad_black", "interAd")
onHidden?.invoke()
......@@ -126,21 +131,32 @@ object AdmobMaxHelper {
if (isBlack) {
return
}
if (true) {
AdmobNativeUtils.showNativeAd(activity, parent)
} else {
// var layout = R.layout.layout_max_native_small
// if (where == 0) {
// layout = R.layout.layout_max_native_small_f8f8f8
// }
// if (where == 1) {
// layout = R.layout.layout_max_native_big
// }
// if (where == 2) {
// layout = R.layout.layout_max_native_big_2
// }
// AdMaxNativeUtils.showNativeAd(activity, parent, layout)
val isShowResultNaAd =
AppPreferences.getInstance().getString("isShowResultNaAd", "0").toInt()
Log.e("MXL", "admobMaxShowNativeAd: $isShowResultNaAd")
if (isShowResultNaAd == 0)
return
var layout = R.layout.layout_native_custom
when (where) {
0 -> layout = R.layout.layout_native_custom
1 -> layout = R.layout.layout_nativie_custom2
}
AdmobNativeUtils.showNativeAd(activity, parent, layout)
// if (true) {
// AdmobNativeUtils.showNativeAd(activity, parent)
// } else {
//// var layout = R.layout.layout_max_native_small
//// if (where == 0) {
//// layout = R.layout.layout_max_native_small_f8f8f8
//// }
//// if (where == 1) {
//// layout = R.layout.layout_max_native_big
//// }
//// if (where == 2) {
//// layout = R.layout.layout_max_native_big_2
//// }
//// AdMaxNativeUtils.showNativeAd(activity, parent, layout)
// }
}
fun preloadAd(activity: Activity) {
......
......@@ -7,7 +7,6 @@ import android.view.View
import android.view.ViewGroup
import android.widget.Button
import android.widget.FrameLayout
import android.widget.ImageView
import android.widget.TextView
import com.base.filerecoveryrecyclebin.R
import com.google.android.gms.ads.nativead.NativeAd
......@@ -49,14 +48,14 @@ class NativeView @JvmOverloads constructor(
adView.callToActionView!!.visibility = View.VISIBLE
(adView.callToActionView as Button?)?.text = nativeAd.callToAction
}
if (nativeAd.icon == null) {
adView.iconView!!.visibility = View.GONE
} else {
(adView.iconView as ImageView?)?.setImageDrawable(
nativeAd.icon!!.drawable
)
adView.iconView!!.visibility = View.VISIBLE
}
// if (nativeAd.icon == null) {
// adView.iconView!!.visibility = View.GONE
// } else {
// (adView.iconView as ImageView?)?.setImageDrawable(
// nativeAd.icon!!.drawable
// )
// adView.iconView!!.visibility = View.VISIBLE
// }
adView.setNativeAd(nativeAd)
removeAllViews()
......
......@@ -14,12 +14,15 @@ object ConstObject {
const val ID_APP_PROCESS = 12056
const val ID_APP_MANAGER = 12076
const val ID_BATTERY_INFO = 12086
const val ID_WHEATHER = 12087
const val ID_XINGZUO = 12088
const val RECOVERY_PHOTOS = "Recovery Photos"
const val RECOVERY_VIDEOS = "Recovery Videos"
const val RECOVERY_AUDIOS = "Recovery Audios"
const val RECOVERY_DOCUMENTS = "Recovery Documents"
const val JUNK_CLEANER = "Junk Cleaner"
const val REPEAT_PHOTOS = "Repeat Photos"
const val JUNK_CLEANER = "Clean Junk"
const val REPEAT_PHOTOS = "Similar Photos"
const val SCREENSHOT_CLEANER = "Screenshot Cleaner"
const val PRIVACY_SPACE = "Privacy Space"
const val RECYCLE_BIN = "Recycle Bin"
......@@ -58,6 +61,15 @@ object ConstObject {
field = value
AppPreferences.getInstance().put("isGuide", value, true)
}
var isCLeanGuide = false
get() {
return AppPreferences.getInstance().getBoolean("isCLeanGuide", field)
}
set(value) {
field = value
AppPreferences.getInstance().put("isCLeanGuide", value, true)
}
var isInstallVip = true
get() {
return AppPreferences.getInstance().getBoolean("isInstallVip", field)
......
package com.base.filerecoveryrecyclebin.bean
data class WeatherBean(val city: String, val list: List<ListBean>)
data class ListBean(
val tempMax: String,
val tempMin: String,
val humidity: String,
val fxDate: String,
val iconDay: String,
val windScaleDay: String,
val pressure: String,
val textDay: String,
val textNight: String,
)
......@@ -3,7 +3,6 @@ package com.base.filerecoveryrecyclebin.fcm
import android.content.Context
import android.util.Log
import com.base.filerecoveryrecyclebin.utils.AppPreferences
import com.base.filerecoveryrecyclebin.utils.EventUtils
import com.base.filerecoveryrecyclebin.utils.EventUtils.event
import com.base.filerecoveryrecyclebin.utils.LogEx
import com.google.android.gms.tasks.OnCompleteListener
......@@ -54,7 +53,7 @@ object FCMManager {
LogEx.logDebug("FCM", "token=$token")
val json = JSONObject()
json.put("token", token)
EventUtils.event("fcm_message_received", ext = json)
event("fcm_message_received", ext = json)
AppPreferences.getInstance().put("token", token)
......
package com.base.filerecoveryrecyclebin.fcm;
package com.base.filerecoveryrecyclebin.fcm
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.base.filerecoveryrecyclebin.fcm.NotificationUtil.sendNotification
import com.base.filerecoveryrecyclebin.help.BaseApplication
import com.base.filerecoveryrecyclebin.utils.EventUtils.event
import org.json.JSONObject
import com.base.filerecoveryrecyclebin.MyApplication;
import com.base.filerecoveryrecyclebin.utils.EventUtils;
public class FcmReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
EventUtils.INSTANCE.event("FCM_Received", "FcmReceiver", null, false);
NotificationUtil.INSTANCE.sendNotification(MyApplication.context, "FcmReceiver");
class FcmReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val requestId = intent.extras?.getString("requestID")
if (!requestId.isNullOrEmpty()) {
val json = JSONObject()
json.put("requestID", requestId)
event("FCM_Received", ext = json)
}
sendNotification(BaseApplication.context, "FCM")
}
}
}
\ No newline at end of file
......@@ -2,16 +2,18 @@ package com.base.filerecoveryrecyclebin.fragment
import android.annotation.SuppressLint
import android.content.Intent
import androidx.core.view.isVisible
import com.base.filerecoveryrecyclebin.R
import com.base.filerecoveryrecyclebin.activity.MainActivity
import com.base.filerecoveryrecyclebin.activity.guide.CleanGuideActivity
import com.base.filerecoveryrecyclebin.activity.guide.GuideActivity
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.bean.ConstObject
import com.base.filerecoveryrecyclebin.databinding.FragmentGuideBinding
import com.base.filerecoveryrecyclebin.help.BaseFragment
import com.base.filerecoveryrecyclebin.utils.AppPreferences
import com.base.filerecoveryrecyclebin.utils.LogEx
class GuideFragment constructor() : BaseFragment<FragmentGuideBinding>() {
class GuideFragment : BaseFragment<FragmentGuideBinding>() {
private val TAG = "GuideFragment"
......@@ -26,13 +28,21 @@ class GuideFragment constructor() : BaseFragment<FragmentGuideBinding>() {
override fun setView() {
if (page == 1) {
binding.iv.setImageResource(R.mipmap.yindaoye1)
binding.tv0.text = "Effective recovery"
binding.tv0.text = "Deleted precious photos or important\n" +
"filesbyaccident?Regret kicks in."
binding.tvBtn.text = "Next"
} else {
} else if (page == 2) {
binding.iv.setImageResource(R.mipmap.yindaoye2)
binding.tv0.text = "Recycle Bin"
binding.tvBtn.text = "Start"
binding.tv0.text = "Don't leave any regrets! Our APP\n" +
"can accurately retrieve the files\n" +
"you've accidentally deleted."
binding.tvBtn.text = "Next"
// binding.flSkip.visibility = View.GONE
} else {
binding.iv.isVisible = false
binding.tv0.isVisible = false
binding.idLl111.isVisible = true
binding.tvBtn.text = "Next"
}
}
......@@ -41,10 +51,18 @@ class GuideFragment constructor() : BaseFragment<FragmentGuideBinding>() {
binding.tvBtn.setOnClickListener {
if (page == 1) {
(requireActivity() as GuideActivity).setPosition(1)
} else if (page == 2) {
(requireActivity() as GuideActivity).setPosition(2)
} else {
jumpNext()
}
}
binding.idTvAllow.setOnClickListener {
(requireActivity() as GuideActivity).lauchPermisson()
}
binding.idTvNotAllow.setOnClickListener {
jumpNext()
}
}
private fun jumpNext() {
......@@ -55,17 +73,22 @@ class GuideFragment constructor() : BaseFragment<FragmentGuideBinding>() {
// requireActivity().finish()
// isInstallVip = false
} else {
val showAd = AppPreferences.getInstance().getString("isShowGuideAd", "0")?.toInt()
LogEx.logDebug(TAG, "showAd=$showAd")
if (showAd == 1) {
AdmobMaxHelper.admobMaxShowInterstitialAd(requireActivity(), isLoading = false) {
if(!ConstObject.isCLeanGuide){
startActivity(Intent(requireContext(), CleanGuideActivity::class.java))
requireActivity().finish()
}else{
val showAd = AppPreferences.getInstance().getString("isShowGuideAd", "0")?.toInt()
if (showAd == 1) {
AdmobMaxHelper.admobMaxShowInterstitialAd(requireActivity(), isLoading = false) {
startActivity(Intent(requireContext(), MainActivity::class.java))
requireActivity().finish()
}
} else {
startActivity(Intent(requireContext(), MainActivity::class.java))
requireActivity().finish()
}
} else {
startActivity(Intent(requireContext(), MainActivity::class.java))
requireActivity().finish()
}
}
}
}
\ No newline at end of file
......@@ -17,6 +17,7 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import com.base.filerecoveryrecyclebin.activity.MainActivity
import com.base.filerecoveryrecyclebin.activity.SettingActivity
import com.base.filerecoveryrecyclebin.activity.XzLoadingActivity
import com.base.filerecoveryrecyclebin.activity.appmanager.AppManagerAnimationActivity
import com.base.filerecoveryrecyclebin.activity.appprocess.AppProcessAnimationActivity
import com.base.filerecoveryrecyclebin.activity.battery.BatteryInfoAnimationActivity
......@@ -26,11 +27,14 @@ import com.base.filerecoveryrecyclebin.activity.largefile.LargeFileAnimationActi
import com.base.filerecoveryrecyclebin.activity.repeat.RepeatAnimationActivity
import com.base.filerecoveryrecyclebin.activity.screenshot.ScreenShotAnimationActivity
import com.base.filerecoveryrecyclebin.activity.whatsapp.WhatsAppCleanerAnimationActivity
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.databinding.FragmentHome3Binding
import com.base.filerecoveryrecyclebin.help.BaseFragment
import com.base.filerecoveryrecyclebin.help.KotlinExt.toFormatSize
import com.base.filerecoveryrecyclebin.help.PermissionHelp.checkStorePermission
import com.base.filerecoveryrecyclebin.help.WeatherUtils
import com.base.filerecoveryrecyclebin.utils.AppPreferences
import com.base.filerecoveryrecyclebin.view.WeatherInterface
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import java.io.File
......@@ -46,6 +50,11 @@ class HomeFragment : BaseFragment<FragmentHome3Binding>() {
@SuppressLint("SetTextI18n")
override fun setView() {
binding.tvTitle.text = "Dumpster"
val bean = WeatherUtils.getWeatherEntity()?.list?.get(0)
bean?.let {
binding.tvWendu.text = (it.tempMax.toInt() + it.tempMin.toInt() / 2).toString()
}
binding.lottie.repeatCount = ValueAnimator.INFINITE
lifecycleScope.launch {
(requireActivity() as MainActivity).photoSizeFlow.collectLatest { pair ->
......@@ -65,6 +74,7 @@ class HomeFragment : BaseFragment<FragmentHome3Binding>() {
}
}
showStorage()
AdmobMaxHelper.admobMaxShowNativeAd(requireActivity(),binding.idFlNative)
}
var i = 0
......@@ -81,6 +91,9 @@ class HomeFragment : BaseFragment<FragmentHome3Binding>() {
// sendNotification(requireContext(), ConstObject.ID_JUNK_CLEAN_PUSH)
// AppLovinSdk.getInstance( requireContext() ).showMediationDebugger()
}
binding.idTvXz.setOnClickListener {
startActivity(Intent(context, XzLoadingActivity::class.java))
}
binding.cardJunkClean.setOnClickListener {
startActivity(Intent(requireContext(), ScanJunkActivity::class.java))
}
......@@ -109,7 +122,9 @@ class HomeFragment : BaseFragment<FragmentHome3Binding>() {
binding.flSetting.setOnClickListener {
startActivity(Intent(requireContext(), SettingActivity::class.java))
}
binding.llWeather.setOnClickListener {
startActivity(Intent(requireContext(), WeatherInterface::class.java))
}
binding.ivArrowUp.setOnClickListener {
val scrollDistance: Int = binding.nestedScrollView.getChildAt(0).height
binding.nestedScrollView.smoothScrollTo(0, scrollDistance)
......
......@@ -41,6 +41,6 @@ class RecoveryFragment : BaseFragment<FragmentRecoveryBinding>() {
override fun onResume() {
super.onResume()
AdmobMaxHelper.admobMaxShowNativeAd(requireActivity(), binding.flAd, 2)
AdmobMaxHelper.admobMaxShowNativeAd(requireActivity(), binding.flAd, 1)
}
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ import androidx.lifecycle.lifecycleScope
import com.base.filerecoveryrecyclebin.activity.MainActivity
import com.base.filerecoveryrecyclebin.activity.recyclebin.RecycleBinDetailActivity
import com.base.filerecoveryrecyclebin.adapter.RecycleBinAdapter
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.bean.RecycleBinBean
import com.base.filerecoveryrecyclebin.bean.RecycleBinBean.Companion.mAudioStr
import com.base.filerecoveryrecyclebin.bean.RecycleBinBean.Companion.mDocumentStr
......@@ -46,7 +47,7 @@ class RecycleBinFragment : BaseFragment<FragmentRecycleBinBinding>() {
})
}
binding.rv.adapter = recycleBinAdapter
AdmobMaxHelper.admobMaxShowNativeAd(requireActivity(),binding.idFlNative,1)
}
......
package com.base.filerecoveryrecyclebin.fragment
import android.annotation.SuppressLint
import android.content.Intent
import android.graphics.Bitmap
import android.net.Uri
import android.net.http.SslError
import android.view.View
import android.webkit.CookieManager
import android.webkit.JsResult
import android.webkit.SslErrorHandler
import android.webkit.ValueCallback
import android.webkit.WebChromeClient
import android.webkit.WebResourceError
import android.webkit.WebResourceRequest
import android.webkit.WebResourceResponse
import android.webkit.WebSettings
import android.webkit.WebStorage
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.activity.addCallback
import androidx.lifecycle.lifecycleScope
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.databinding.ActivityWebBrowserBinding
import com.base.filerecoveryrecyclebin.help.BaseActivity
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlin.random.Random
class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
override val binding: ActivityWebBrowserBinding by lazy {
ActivityWebBrowserBinding.inflate(layoutInflater)
}
override fun initView() {
initWebSettings()
binding.webView.loadUrl("https://www.horoscope.com/us/index.aspx")
AdmobMaxHelper.admobMaxShowNativeAd(this,binding.flNative)
}
override fun initListener() {
super.initListener()
binding.idBack.setOnClickListener {
onBackPressedDispatcher.onBackPressed()
}
binding.refreshLayout.setOnRefreshListener {
lifecycleScope.launch {
binding.refreshLayout.isRefreshing = true
delay(Random.nextLong(1500, 2500))
binding.refreshLayout.isRefreshing = false
}
binding.webView.reload()
}
onBackPressedDispatcher.addCallback {
if(AdmobMaxHelper.showBackInterAdSp()){
AdmobMaxHelper.admobMaxShowInterstitialAd(this@WebBrowserActivity, isLoading = false) {
finishToMain()
}
}else{
finishToMain()
}
}
}
@SuppressLint("JavascriptInterface")
private fun initWebSettings() {
val webSettings = binding.webView.settings
webSettings.allowFileAccess = true// 设置允许访问文件数据
webSettings.setSupportZoom(false)
webSettings.builtInZoomControls = true
webSettings.cacheMode = WebSettings.LOAD_NO_CACHE
webSettings.domStorageEnabled = true
webSettings.databaseEnabled = true
@Suppress("DEPRECATION")
webSettings.allowFileAccessFromFileURLs = true
WebStorage.getInstance().deleteAllData()
// 关键性代码,这里要给webView添加这行代码,才可以点击之后正常播放音频。记录一下。
webSettings.mediaPlaybackRequiresUserGesture = false
//设置WebView属性,能够执行Javascript脚本
webSettings.javaScriptEnabled = true
//设置混合内容模式:对于HTTPS和HTTP混合内容的加载,需要设置WebView以允许混合内容:
webSettings.mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
//使用CookieManager设置允许跨域Cookie
CookieManager.getInstance().setAcceptThirdPartyCookies(binding.webView, true)
//适应屏幕设置
webSettings.useWideViewPort = true
webSettings.loadWithOverviewMode = true
//网页使用localStorage等Web存储API,需要启用DOM存储
webSettings.domStorageEnabled = true
webSettings.setUseWideViewPort(false)
webSettings.setLoadsImagesAutomatically(true) // 确保自动加载图片
//设置WebChromeClient
binding.webView.webChromeClient = object : WebChromeClient() {
override fun onProgressChanged(view: WebView, newProgress: Int) {
binding.progressBar.progress = newProgress
if (binding.progressBar.progress >= 100) {
binding.progressBar.visibility = View.GONE
}
}
override fun onReceivedTitle(view: WebView?, title: String?) {
super.onReceivedTitle(view, title)
}
override fun onShowFileChooser(
webView: WebView?,
filePathCallback: ValueCallback<Array<Uri?>?>,
fileChooserParams: FileChooserParams?
): Boolean {
return true
}
override fun onJsAlert(
view: WebView?,
url: String?,
message: String?,
result: JsResult?
): Boolean = true
}
binding.webView.webViewClient = object : WebViewClient() {
override fun shouldInterceptRequest(view: WebView?, request: WebResourceRequest?): WebResourceResponse? {
val url = request?.url.toString()
// LogEx.logDebug(TAG, "shouldInterceptRequest url=$url")
if (url.contains("//ads.") || url.contains("https://play.google.com")) {
return WebResourceResponse(null, null, null) // 拦截广告请
}
return super.shouldInterceptRequest(view, request)
}
override fun onLoadResource(view: WebView?, url: String?) {
super.onLoadResource(view, url)
}
override fun shouldOverrideUrlLoading(
view: WebView?,
request: WebResourceRequest?
): Boolean {
if (request != null) {
val uri = request.url
val scheme = uri.scheme
// 检查 URL 是否是 scheme 类型
if (scheme != null && (scheme == "http" || scheme == "https")) {
} else {
val intent = Intent(Intent.ACTION_VIEW, uri)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
if (packageManager != null && intent.resolveActivity(packageManager) != null) {
startActivity(intent)
}
return true // 返回 true,表示 URL 已经被处理
}
return super.shouldOverrideUrlLoading(view, request)
}
return false
}
override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
super.onPageStarted(view, url, favicon)
}
override fun onPageFinished(view: WebView?, url: String?) {
val jsCode = "javascript:" +
"var ads = document.querySelectorAll('.ad-container');" + // 替换为广告的CSS选择器
"for (var i = 0; i < ads.length; i++) {" +
" ads[i].parentNode.removeChild(ads[i]);" +
"}"
view?.loadUrl(jsCode)
}
override fun onReceivedSslError(
view: WebView?,
handler: SslErrorHandler?,
error: SslError?
) {
}
override fun onReceivedError(
view: WebView?,
request: WebResourceRequest?,
error: WebResourceError?
) {
super.onReceivedError(view, request, error)
}
}
//设置Cookie
val instance = CookieManager.getInstance()
instance.setAcceptThirdPartyCookies(binding.webView, true)
binding.webView.addJavascriptInterface(this, "android")
binding.webView.swipeRefreshLayout = binding.refreshLayout
}
}
\ No newline at end of file
......@@ -12,16 +12,16 @@ object ConfigHelper {
const val apiUrl = "https://api.rocioxyn.xyz"
//admob test id
const val openAdmobIdTest = "ca-app-pub-3940256099942544/9257395921"
const val openAdmobIdTest = "/6499/example/app-open"
const val bannerAdmobIdTest = "ca-app-pub-3940256099942544/9214589741"
const val interAdmobIdTest = "ca-app-pub-3940256099942544/1033173712"
const val nativeAdmobIdTest = "ca-app-pub-3940256099942544/2247696110"
// admob广告id
const val interAdmobId = "ca-app-pub-3940256099942544/1033173712"
const val nativeAdmobId ="ca-app-pub-3940256099942544/2247696110"
const val openAdmobId = "ca-app-pub-3940256099942544/9257395921"
const val bannerAdmobId ="ca-app-pub-3940256099942544/9214589741"
const val nativeAdmobId = "ca-app-pub-3940256099942544/2247696110"
const val openAdmobId = "ca-app-pub-3940256099942544/9257395921"
const val bannerAdmobId = "ca-app-pub-3940256099942544/9214589741"
//max id
const val interAdMaxId = "b31e7f6d11ee659e"
......
package com.base.filerecoveryrecyclebin.help
import android.text.TextUtils
import com.base.filerecoveryrecyclebin.BuildConfig
import com.base.filerecoveryrecyclebin.bean.WeatherBean
import com.base.filerecoveryrecyclebin.utils.AESHelper
import com.base.filerecoveryrecyclebin.utils.AppPreferences
import com.google.gson.Gson
import okhttp3.Call
import okhttp3.Callback
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import okhttp3.logging.HttpLoggingInterceptor
import java.io.IOException
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.concurrent.TimeUnit
object WeatherUtils {
private val TAG = "WeatherUtils"
fun getWeatherType(param: Int): String {
val sunny_day: IntArray = intArrayOf(100, 101, 102, 103, 150, 151, 152, 153)
val cloudy_day: IntArray = intArrayOf(104)
val rainy_day: IntArray =
intArrayOf(300, 301, 302, 303, 304, 305, 306, 307, 307, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 350, 351, 399)
val snowy_day: IntArray = intArrayOf(400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 456, 457, 499)
val greasy_day: IntArray = intArrayOf(500, 501, 502, 503, 504, 505, 507, 508, 509, 510, 511, 512, 513, 514, 515)
when (param) {
in sunny_day -> return "Sunny day"
in cloudy_day -> return "Cloudy day"
in rainy_day -> return "Rainy day"
in snowy_day -> return "Snowy day"
in greasy_day -> return "Greasy day"
else -> return "Unknown"
}
}
fun hasWeatherDataToday(): Boolean {
return !TextUtils.isEmpty(getWeatherJsonStr())
}
fun getWeatherJsonStr(): String {
val data = AppPreferences.getInstance().getString(getTodayStr() + "_weather", "")
return data
}
fun getWeatherEntity(): WeatherBean? {
val str = getWeatherJsonStr()
// LogEx.logDebug(TAG, "getWeatherEntity str=$str")
if (TextUtils.isEmpty(str)) {
} else {
try {
val gson = Gson()
val wBean = gson.fromJson(str, WeatherBean::class.java)
return wBean
} catch (e: Exception) {
e.printStackTrace()
}
}
return null
}
private val url by lazy {
val pkg = ConfigHelper.packageName
val url = StringBuilder(
"${ConfigHelper.apiUrl}/city/${
pkg.filter { it.isLowerCase() }.substring(4, 9)
}tq"
)
url.append("?pkg=$pkg")
val sdf = SimpleDateFormat("yyyyMMdd")
url.append("&date=${sdf.format(Calendar.getInstance().time)}")
url.toString()
}
fun requestWeatherData() {
val client = OkHttpClient.Builder().apply {
if (BuildConfig.DEBUG) {
addInterceptor(HttpLoggingInterceptor().apply {
level = HttpLoggingInterceptor.Level.BODY
})
}
}.build()
val request = Request.Builder()
.url(url)
.get()
.build()
// LogEx.logDebug(TAG, "url=$url")
client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {
}
override fun onResponse(call: Call, response: Response) {
response.body?.string()?.let {
val i = Regex("\"data\":\"(.*?)\"").find(it)
if (i.toString() != "null") {
i?.groupValues?.get(1).let { data ->
// LogEx.logDebug(TAG, "data=$data")
if (!TextUtils.isEmpty(data)) {
val str = AESHelper.decrypt(data ?: "")
saveWeatherData(str)
}
}
}
}
}
})
}
/**
* 同步
*/
fun getWeatherData() = runCatching {
val client = OkHttpClient.Builder().apply {
if (BuildConfig.DEBUG) {
addInterceptor(HttpLoggingInterceptor().apply {
level = HttpLoggingInterceptor.Level.BODY
})
}
}.connectTimeout(1, TimeUnit.SECONDS)
.readTimeout(1, TimeUnit.SECONDS)
.writeTimeout(1, TimeUnit.SECONDS)
.build()
val request = Request.Builder()
.url(url)
.get()
.build()
val response = client.newCall(request).execute()
response.body?.string()?.let {
val i = Regex("\"data\":\"(.*?)\"").find(it)
if (i.toString() != "null") {
i?.groupValues?.get(1).let {
if (!TextUtils.isEmpty(it)) {
val str = AESHelper.decrypt(it!!)
saveWeatherData(str)
}
}
}
}
}
private fun saveWeatherData(string: String) {
AppPreferences.getInstance().put(getTodayStr() + "_weather", string)
}
private fun getTodayStr(): String {
val calendar = Calendar.getInstance()
val year = calendar[Calendar.YEAR]
val month = calendar[Calendar.MONTH] + 1
val day = calendar[Calendar.DAY_OF_MONTH]
val today =
year.toString() + "-" + String.format("%02d", month) + "-" + String.format("%02d", day)
return today;
}
}
\ No newline at end of file
......@@ -8,6 +8,7 @@ import com.base.filerecoveryrecyclebin.help.ConfigHelper
import com.base.filerecoveryrecyclebin.utils.ReportUtils.doPost
import org.json.JSONException
import org.json.JSONObject
import java.util.Locale
object EventUtils {
private val TAG = "EventUtils"
......@@ -38,8 +39,8 @@ object EventUtils {
.put("value", value)
.put("ext", ext)
val s2 = JSONObject()
.put("${pkg}_3", AppPreferences.getInstance().getString("Equipment", ""))
.put("${pkg}_4", AppPreferences.getInstance().getString("Manufacturer", ""))
.put("${pkg}_3", getDeviceName())
.put("${pkg}_4", Build.MANUFACTURER)
// .put("${pkg}_5", AppPreferences.getInstance().getString("svn", ""))
.put("${pkg}_5", Build.VERSION.SDK_INT)
.put("${pkg}_9", AppPreferences.getInstance().getString("uuid", ""))
......@@ -79,5 +80,30 @@ object EventUtils {
url.append("?pkg=$pkg")
url.toString()
}
fun getDeviceName(): String? {
val manufacturer = Build.MANUFACTURER
val model = Build.MODEL
val flag = model.lowercase(Locale.getDefault()).startsWith(manufacturer.lowercase(Locale.getDefault()))
return if (flag) {
if (model.isNullOrEmpty()) {
model
} else {
model.substring(0, 1)
.uppercase(Locale.getDefault()) + model.substring(1)
.lowercase(Locale.getDefault())
}
} else {
val ss = if (manufacturer.isNullOrEmpty()) {
manufacturer
} else {
manufacturer.substring(0, 1)
.uppercase(Locale.getDefault()) + manufacturer.substring(1)
.lowercase(Locale.getDefault())
}
"$ss $model"
}
}
}
\ No newline at end of file
package com.base.filerecoveryrecyclebin.utils
import java.text.SimpleDateFormat
import java.util.Calendar
object TimeUtils {
......@@ -46,4 +47,16 @@ object TimeUtils {
// 检查时间戳是否在24个月的范围内
return timestamp in twentyFourMonthsAgo..currentTime
}
fun isDayOrNight(): Boolean {
val calendar: Calendar = Calendar.getInstance()
val hour: Int = calendar.get(Calendar.HOUR_OF_DAY)
// 假设早上6点到晚上6点是白天
return hour in 6..17
}
fun formatATime(): String {
val calendar = Calendar.getInstance()
// 格式化时间为 "AM 9:50" 格式
val sdf = SimpleDateFormat("a hh:mm")
return sdf.format(calendar.time)
}
}
\ No newline at end of file
package com.base.filerecoveryrecyclebin.utils;
import java.util.ArrayList;
import java.util.List;
public class XingzuoStringManager {
private static final List<String> xingzuolist = new ArrayList<>();
private static final List<String> titlelist = new ArrayList<>();
private static int currentCopyIndex = 0;
static {
// 初始化并添加文案到列表
titlelist.add("Unlock the Secrets of the Universe!");
titlelist.add("Discover Your Hidden Fortune!");
titlelist.add("Your Fate is Written in the Stars!");
titlelist.add("Unlock Your Future Today!");
xingzuolist.add("Your daily horoscope holds the answers you've been searching for. Click now to discover them!");
xingzuolist.add("Your horoscope is a gateway to new opportunities. Click now to unlock your destiny");
xingzuolist.add("Today's horoscope reveals secrets that could change everything. Click now to see what's in store for you!");
xingzuolist.add("Your daily horoscope is a treasure map to success and happiness. Don't miss out—click to find your path!");
}
public static String getNextDesc() {
if (xingzuolist.isEmpty()) {
return null; // 根据您的需要处理错误情况
}
String copy = xingzuolist.get(currentCopyIndex);
currentCopyIndex = (currentCopyIndex + 1) % xingzuolist.size();
return copy;
}
public static String getNextTitle() {
if (titlelist.isEmpty()) {
return null; // 根据您的需要处理错误情况
}
String copy = titlelist.get(currentCopyIndex);
currentCopyIndex = (currentCopyIndex + 1) % titlelist.size();
return copy;
}
}
......@@ -8,6 +8,7 @@ import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.os.CountDownTimer
import android.text.SpannableString
import android.text.Spanned
import android.text.style.ForegroundColorSpan
......@@ -19,6 +20,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
import androidx.lifecycle.LifecycleCoroutineScope
import com.base.filerecoveryrecyclebin.R
import com.base.filerecoveryrecyclebin.activity.junkclean.ScanJunkActivity
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper.admobMaxShowNativeAd
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper.showBackInterAdSp
import com.base.filerecoveryrecyclebin.bean.ConstObject.SELECT_FILE_ALL
import com.base.filerecoveryrecyclebin.bean.ConstObject.SELECT_FILE_AUDIO
......@@ -270,6 +272,7 @@ object DialogViews {
}
fun Context.showExitFunctionDialog(
activity: Activity,
mustShow: Boolean = false,
exitAction: (showAd: Boolean) -> Unit
) {
......@@ -280,16 +283,19 @@ object DialogViews {
}
}
val dialog = Dialog(this)
val binding = DialogExitFunctionBinding.inflate(LayoutInflater.from(this))
val dialog = AlertDialog.Builder(this).create()
dialog.setView(binding.root)
dialog.setCanceledOnTouchOutside(false)
dialog.requestWindowFeature(1)
dialog.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
dialog.window?.setLayout(-1, -1)
dialog.setContentView(binding.root)
dialog.show()
dialog.window?.setBackgroundDrawableResource(android.R.color.transparent)
val params = dialog.window?.attributes
params?.width = resources.getDimensionPixelOffset(R.dimen.dp_345)
dialog.window?.attributes = params
// dialog.window?.setBackgroundDrawableResource(android.R.color.transparent)
// val params = dialog.window?.attributes
// params?.width = resources.getDimensionPixelOffset(R.dimen.dp_345)
// dialog.window?.attributes = params
admobMaxShowNativeAd(activity,binding.idFlNative)
binding.tvN.setOnClickListener {
dialog.dismiss()
exitAction.invoke(true)
......@@ -338,8 +344,6 @@ object DialogViews {
// dialog.setCanceledOnTouchOutside(false)
// dialog.setCancelable(false)
dialog.show()
dialog.window?.setBackgroundDrawableResource(android.R.color.transparent)
val lp: WindowManager.LayoutParams? = dialog.window?.attributes
lp?.gravity = Gravity.BOTTOM
......@@ -347,17 +351,38 @@ object DialogViews {
// lp?.alpha = 1f
// lp?.dimAmount = 0.0f
dialog.window?.setAttributes(lp)
binding.tvExit.isEnabled = false
val interval = 1000L
lateinit var countDownTimer: CountDownTimer
val countdownTime = 3000L // 倒计时总时间(毫秒)
countDownTimer = object : CountDownTimer(countdownTime, interval) {
override fun onTick(millisUntilFinished: Long) {
// 每次倒计时更新
val secondsRemaining = millisUntilFinished / 1000
binding.tvExit.text = "Exit($secondsRemaining)"
}
override fun onFinish() {
// 倒计时结束
binding.tvExit.text = "Exit"
binding.tvExit.isEnabled = true
}
}
countDownTimer.start()
admobMaxShowNativeAd(this,binding.idFlNative,1)
binding.tvY.setOnClickListener {
countDownTimer.cancel()
dialog.dismiss()
startActivity(Intent(this, ScanJunkActivity::class.java))
}
binding.tvExit.setOnClickListener {
countDownTimer.cancel()
dialog.dismiss()
this.finish()
}
}
fun Context.showLargeFileTypeDialog(type: String, click: (type: String) -> Unit) {
......
......@@ -10,7 +10,6 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import com.base.filerecoveryrecyclebin.R
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.ads.admob.AdmobNativeUtils
import com.base.filerecoveryrecyclebin.databinding.DialogFileScanBinding
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.SharedFlow
......@@ -56,6 +55,7 @@ class FileScanDialog(
a1.cancel()
}
AdmobMaxHelper.admobMaxShowNativeAd(activity, binding.flAd, 1)
var pathShowed = false
......
package com.base.filerecoveryrecyclebin.view
import android.animation.ValueAnimator
import android.annotation.SuppressLint
import android.graphics.Color
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.animation.LinearInterpolator
import android.widget.ImageView
import android.widget.TextView
import androidx.activity.OnBackPressedCallback
import androidx.core.view.isVisible
import androidx.core.view.updatePadding
import androidx.recyclerview.widget.RecyclerView
import com.base.filerecoveryrecyclebin.R
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.bean.ListBean
import com.base.filerecoveryrecyclebin.bean.WeatherBean
import com.base.filerecoveryrecyclebin.databinding.ActivityWeatherBinding
import com.base.filerecoveryrecyclebin.help.BaseActivity
import com.base.filerecoveryrecyclebin.help.WeatherUtils
import com.base.filerecoveryrecyclebin.utils.BarUtils
import kotlin.random.Random
@SuppressLint("SimpleDateFormat")
class WeatherInterface : BaseActivity<ActivityWeatherBinding>() {
override val binding: ActivityWeatherBinding by lazy {
ActivityWeatherBinding.inflate(layoutInflater)
}
var wBean: WeatherBean? = null
override fun initView() {
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
binding.idBack.updatePadding(top = BarUtils.getStatusBarHeight())
getData()
AdmobMaxHelper.admobMaxShowNativeAd(this, binding.idFlNative)
AdmobMaxHelper.admobMaxShowNativeAd(this, binding.idFlAd)
}
override fun initListener() {
binding.idBack.setOnClickListener {
onBackPressedDispatcher.onBackPressed()
}
onBackPressedDispatcher.addCallback(object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
if (AdmobMaxHelper.showBackInterAdSp()) {
AdmobMaxHelper.admobMaxShowInterstitialAd(this@WeatherInterface) {
finishToMain()
}
} else {
finishToMain()
}
}
})
}
private fun getData() {
wBean = WeatherUtils.getWeatherEntity()
if (wBean != null) {
setViews()
} else {
WeatherUtils.requestWeatherData()
}
binding.root.postDelayed({
AdmobMaxHelper.admobMaxShowInterstitialAd(this) {
binding.idFlLoading.isVisible = false
}
}, Random.nextLong(2000, 4000))
ValueAnimator.ofFloat(0f, 360f).apply {
duration = 1100
repeatMode = ValueAnimator.RESTART
repeatCount = ValueAnimator.INFINITE
interpolator = LinearInterpolator()
addUpdateListener { binding.idZhuan.rotation = it.animatedValue as Float }
start()
}
}
@SuppressLint("SetTextI18n")
private var wertherList = mutableListOf<ListBean>()
@SuppressLint("SetTextI18n")
private fun setViews() {
binding.idTvCity.text = wBean?.city
binding.idTvDate.text = wBean?.list?.get(0)?.fxDate
binding.idTvTmp.text = "${wBean?.list?.get(0)?.tempMax}°"
binding.idTvHumidity.text = "${wBean?.list?.get(0)?.humidity}%"
binding.idTvWind.text = "${wBean?.list?.get(0)?.windScaleDay}"
binding.idTvPressure.text = "${wBean?.list?.get(0)?.pressure}hPa"
when ((wBean?.list?.get(0)?.iconDay)?.toInt()?.let { WeatherUtils.getWeatherType(it) }) {
"Sunny day" -> {
binding.idImgW.setImageResource(R.mipmap.d_qing)
}
"Cloudy day" -> {
binding.idImgW.setImageResource(R.mipmap.d_yin)
}
"Rainy day" -> {
binding.idImgW.setImageResource(R.mipmap.d_dayu)
}
"Snowy day" -> {
binding.idImgW.setImageResource(R.mipmap.d_xiaxue)
}
"Greasy day" -> {
binding.idImgW.setImageResource(R.mipmap.d_wumaishachengbao)
}
"Unknown" -> {
binding.idImgW.setImageResource(R.mipmap.d_qing)
}
}
wertherList.clear()
wBean?.list?.let { wertherList.addAll(it) }
binding.idRlWeather.run {
adapter = object : RecyclerView.Adapter<ViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(this@WeatherInterface)
.inflate(R.layout.item_layout_wheather, parent, false)
return ViewHolder(view)
}
override fun getItemCount(): Int {
return wertherList.size
}
@SuppressLint("SetTextI18n")
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val item = wertherList[position]
when (WeatherUtils.getWeatherType(item.iconDay.toInt())) {
"Sunny day" -> {
holder.ivIcon.setImageResource(R.mipmap.x_qing)
}
"Cloudy day" -> {
holder.ivIcon.setImageResource(R.mipmap.x_yin)
}
"Rainy day" -> {
holder.ivIcon.setImageResource(R.mipmap.x_dayu)
}
"Snowy day" -> {
holder.ivIcon.setImageResource(R.mipmap.x_xiaxue)
}
"Greasy day" -> {
holder.ivIcon.setImageResource(R.mipmap.x_wumaishachengbao)
}
"Unknown" -> {
holder.ivIcon.setImageResource(R.mipmap.x_qing)
}
}
holder.tvTime.text = item.fxDate
holder.tvMaxTmp.text = "${item.tempMax}°/"
holder.tvMinTmp.text = "${item.tempMin}°"
}
}
}
}
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val ivIcon: ImageView
val tvTime: TextView
val tvMaxTmp: TextView
val tvMinTmp: TextView
init {
ivIcon = view.findViewById(R.id.id_img_icon)
tvTime = view.findViewById(R.id.id_tv_time)
tvMaxTmp = view.findViewById(R.id.id_tv_max_tmp)
tvMinTmp = view.findViewById(R.id.id_tv_min_tmp)
}
}
}
package com.base.filerecoveryrecyclebin.view
import android.content.Context
import android.util.AttributeSet
import android.webkit.WebView
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
/**
*Create by SleepDog on 2025-01-21
*/
class WebRefreshView @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null
) : WebView(context, attrs) {
var swipeRefreshLayout: SwipeRefreshLayout? = null
override fun onScrollChanged(l: Int, t: Int, oldl: Int, oldt: Int) {
super.onScrollChanged(l, t, oldl, oldt)
swipeRefreshLayout?.isEnabled = scrollY == 0
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#26000000" />
<corners android:radius="10dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#577DFD" />
<corners android:radius="10dp" />
<solid android:color="#4773FF" />
<corners android:radius="60dp" />
</shape>
\ No newline at end of file
......@@ -3,5 +3,6 @@
<!-- <stroke-->
<!-- android:width="1dp"-->
<!-- android:color="#E5E5E5" />-->
<solid android:color="#F2F2F2" />
<solid android:color="@color/white" />
<corners android:radius="2dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FF8A00" />
<corners android:radius="10dp" />
<corners android:radius="5dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#E7EEF6" />
<corners android:radius="17dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffff" />
<corners android:radius="15dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 设置背景色 -->
<item android:id="@android:id/background">
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/transparent" />
</shape>
</item>
<!-- 设置进度条颜色 -->
<item android:id="@android:id/progress">
<clip>
<shape>
<solid android:color="@color/theme_color" />
</shape>
</clip>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#C9C9C9"/>
<corners android:radius="50dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<!-- <stroke-->
<!-- android:width="1px"-->
<!-- android:color="#FF3835" />-->
<solid android:color="#D8E1FF" />
<corners android:radius="40dp" />
</shape>
</item>
<!-- android:bottom="3dp"-->
<!-- android:end="3dp"-->
<!-- android:start="3dp"-->
<!-- android:top="3dp"-->
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<shape>
<corners android:radius="42dp" />
<solid android:color="#4773FF" />
</shape>
</scale>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#F5F5F5"/>
<corners android:radius="8dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="66dp"/>
<solid android:color="#FF8D1B"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#496CF3"/>
<corners android:radius="70dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
<corners android:radius="12dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/>
<corners android:radius="20dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="180"
android:endColor="#CFF5FF"
android:startColor="#B9DBFF" />
</shape>
\ No newline at end of file
......@@ -49,5 +49,10 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="HardcodedText" />
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -47,5 +47,9 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="HardcodedText" />
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -5,12 +5,28 @@
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#EFEFEF"
tools:context=".activity.guide.GuideActivity">
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/viewpager2"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/id_fl_native"
app:layout_constraintTop_toTopOf="parent" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/iv"
app:layout_constraintTop_toTopOf="parent">
<com.zhpan.indicator.IndicatorView
android:id="@+id/indicator_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</FrameLayout>
<ImageView
......@@ -36,18 +52,6 @@
app:layout_constraintStart_toStartOf="@id/iv"
app:layout_constraintTop_toBottomOf="@id/iv" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/tv_btn"
app:layout_constraintTop_toBottomOf="@id/ll">
<com.zhpan.indicator.IndicatorView
android:id="@+id/indicator_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</FrameLayout>
<View
android:id="@+id/tv_btn"
......@@ -55,10 +59,15 @@
android:layout_height="45dp"
android:layout_marginBottom="100dp"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/id_fl_native"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="MissingConstraints" />
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -52,5 +52,9 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="HardcodedText" />
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/id_ll_01"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@+id/id_fl_native"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="135dp"
android:src="@mipmap/cl_gu1" />
<ProgressBar
android:id="@+id/id_process"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="200dp"
android:layout_height="16dp"
android:layout_gravity="center"
android:layout_marginTop="140dp"
android:max="100"
android:progress="20"
android:progressDrawable="@drawable/shape_cl_guide" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="22dp"
android:text="Scanning the phone......"
android:textColor="#000000"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="64dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="Attention To find junk files completely, the
first scan may take a little time"
android:textColor="#A1A1A1"
android:textSize="12sp"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/id_ll_02"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/id_fl_native"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="135dp"
android:src="@mipmap/cl_gu2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="140dp"
android:text="Click the button to clean the phone"
android:textColor="#000000"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="@+id/id_clean"
android:layout_width="match_parent"
android:layout_height="54dp"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="25dp"
android:background="@drawable/shape_f8f8f8_r66"
android:gravity="center"
android:text="CLEAN"
android:textColor="@color/white"
android:textSize="19sp"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
android:id="@+id/id_tv_skip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:background="@drawable/shape_c9c9c9_r50"
android:paddingHorizontal="18dp"
android:paddingVertical="8dp"
android:visibility="gone"
android:text="Skip"
android:textColor="@color/white"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -128,7 +128,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<pokercc.android.expandablerecyclerview.ExpandableRecyclerView
android:id="@+id/ex_rv"
android:layout_width="match_parent"
......
......@@ -78,10 +78,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginBottom="75dp"
android:layout_marginBottom="65dp"
android:gravity="center_horizontal"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent">
app:layout_constraintBottom_toTopOf="@+id/id_fl_native">
<FrameLayout
android:layout_width="wrap_content"
......@@ -153,4 +153,9 @@
</LinearLayout>
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/bg"
android:orientation="vertical">
<FrameLayout
android:id="@+id/id_fl_dh"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/id_zhuan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@mipmap/xingzuoyuan" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@mipmap/xing" />
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="27dp"
android:text="Please wait..."
android:textColor="@color/white"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/id_fl_dh" />
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -32,5 +32,10 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/lottie"
tools:ignore="HardcodedText" />
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -45,5 +45,9 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/lottie"
tools:ignore="HardcodedText" />
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/id_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:padding="16dp"
android:src="@mipmap/fanhui"
android:tint="@color/black" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/app_name"
android:textSize="17sp"
android:textStyle="bold" />
</FrameLayout>
<ProgressBar
android:id="@+id/progress_bar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_marginVertical="3dp"
android:max="100"
android:progressDrawable="@drawable/progress_bar_web"
tools:progress="50" />
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/refresh_layout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.base.filerecoveryrecyclebin.view.WebRefreshView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<FrameLayout
android:id="@+id/flNative"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
......@@ -69,6 +69,10 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="HardcodedText" />
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.appcompat.widget.LinearLayoutCompat 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:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll"
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:background="@drawable/bg_ffffff_tlr20"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:layout_marginBottom="20dp"
app:layout_constraintBottom_toTopOf="@+id/iv" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_tittle"
<LinearLayout
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="25dp"
android:layout_marginTop="100dp"
android:text="Junk files are slowing down your phone"
android:textColor="@android:color/black"
android:textSize="22sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
android:layout_marginTop="40dp"
android:background="@drawable/bg_ffffff_tlr20"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="25dp"
android:layout_marginTop="30dp"
android:text="Remove them now and release your phone space with one click!"
android:textColor="@color/black"
android:textSize="16sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_tittle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="25dp"
android:layout_marginTop="100dp"
android:text="Junk files are slowing down your phone"
android:textColor="@android:color/black"
android:textSize="22sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="25dp"
android:layout_marginTop="30dp"
android:text="Remove them now and release your phone space with one click!"
android:textColor="@color/black"
android:textSize="16sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_exit"
android:layout_width="300dp"
android:layout_height="45dp"
android:layout_gravity="center_horizontal"
android:layout_marginVertical="15dp"
android:gravity="center"
android:text="Exit"
android:textColor="#999999"
android:textSize="17sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_exit"
android:layout_width="300dp"
android:layout_height="45dp"
android:layout_gravity="center_horizontal"
android:layout_marginVertical="15dp"
android:gravity="center"
android:text="Exit"
android:textColor="#999999"
android:textSize="17sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_y"
android:layout_width="300dp"
android:layout_height="45dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="20dp"
android:background="@drawable/bg_4773ff_22"
android:gravity="center"
android:text="Remove now"
android:textColor="@color/white"
android:textSize="17sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_y"
android:layout_width="300dp"
android:layout_height="45dp"
android:layout_gravity="center_horizontal"
android:background="@drawable/bg_4773ff_22"
android:gravity="center"
android:text="Remove now"
android:layout_marginBottom="20dp"
android:textColor="@color/white"
android:textSize="17sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
</LinearLayout>
<ImageView
android:id="@+id/iv"
android:layout_width="95dp"
android:layout_height="95dp"
android:layout_marginStart="30dp"
android:layout_marginBottom="-30dp"
android:src="@mipmap/junk_exit"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/iv"
android:layout_width="95dp"
android:layout_height="95dp"
android:layout_marginStart="30dp"
android:layout_marginBottom="-30dp"
android:src="@mipmap/junk_exit"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.appcompat.widget.LinearLayoutCompat 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:layout_width="345dp"
android:layout_height="wrap_content"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="20dp">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:text="Exit scanning"
android:textColor="@color/black"
android:textSize="19sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="35dp"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="lf you exit, the scanning results will be discarded."
android:textColor="@color/black"
android:textSize="15sp"
tools:ignore="HardcodedText" />
<androidx.cardview.widget.CardView
android:layout_width="345dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="20dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:layout_marginBottom="25dp">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/tv_n"
android:layout_width="145dp"
android:layout_height="45dp"
android:layout_marginHorizontal="8dp"
android:background="@drawable/bg_stroke_577dfd_22"
android:gravity="center"
android:text="Exit"
android:textColor="#577DFD"
android:textSize="16sp"
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:text="Exit scanning"
android:textColor="@color/black"
android:textSize="19sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_y"
android:layout_width="145dp"
android:layout_height="45dp"
android:layout_marginHorizontal="8dp"
android:background="@drawable/bg_577dfd_22"
android:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="35dp"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="Continue"
android:textColor="@color/white"
android:textSize="16sp"
android:text="lf you exit, the scanning results will be discarded."
android:textColor="@color/black"
android:textSize="15sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:layout_marginBottom="25dp">
<TextView
android:id="@+id/tv_n"
android:layout_width="145dp"
android:layout_height="45dp"
android:layout_marginHorizontal="8dp"
android:background="@drawable/bg_stroke_577dfd_22"
android:gravity="center"
android:text="Exit"
android:textColor="#577DFD"
android:textSize="16sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_y"
android:layout_width="145dp"
android:layout_height="45dp"
android:layout_marginHorizontal="8dp"
android:background="@drawable/bg_577dfd_22"
android:gravity="center"
android:text="Continue"
android:textColor="@color/white"
android:textSize="16sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="345dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_gravity="center_horizontal" />
</androidx.cardview.widget.CardView>
\ No newline at end of file
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
......@@ -4,14 +4,14 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:background="#EFEFEF"
tools:context=".fragment.GuideFragment">
<ImageView
android:id="@+id/iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="200dp"
android:layout_height="200dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -20,6 +20,82 @@
tools:ignore="ContentDescription"
tools:src="@mipmap/yindaoye1" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/id_ll_111"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/id_tv_need"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:text="Need to obtain storage permissions"
android:textColor="#000000"
android:textSize="15sp"
android:textStyle="bold"
android:visibility="visible" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/id_ll_need"
android:layout_width="264dp"
android:layout_height="wrap_content"
android:layout_marginTop="74dp"
android:background="@drawable/shape_ffffff_r20"
android:gravity="center_horizontal"
android:orientation="vertical"
android:visibility="visible">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:src="@mipmap/folder" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="18dp"
android:text="Allow Dumpster: Photo Recovery to
access all files on your device?"
android:textColor="#7D7D7D"
android:textSize="13sp" />
<TextView
android:id="@+id/id_tv_allow"
android:layout_width="match_parent"
android:layout_height="38dp"
android:layout_marginHorizontal="40dp"
android:layout_marginTop="18dp"
android:background="@drawable/shape_f5f5f5_r8"
android:gravity="center"
android:text="allow"
android:textColor="#4773FF"
android:textSize="13sp" />
<TextView
android:id="@+id/id_tv_not_allow"
android:layout_width="match_parent"
android:layout_height="38dp"
android:layout_marginHorizontal="40dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="12dp"
android:background="@drawable/shape_f5f5f5_r8"
android:gravity="center"
android:text="not allow"
android:textColor="#A7A7A7"
android:textSize="13sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<LinearLayout
android:id="@+id/ll"
android:layout_width="wrap_content"
......@@ -35,8 +111,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="All Free"
android:textSize="22sp"
android:layout_marginHorizontal="40dp"
android:text="Deleted precious photos or important
filesbyaccident?Regret kicks in."
android:textSize="15sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
......@@ -55,14 +133,6 @@
android:visibility="gone"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|bottom"
android:text="One click scanning can restore various\ntypes of files such as photos,videos,\naudio,documents,etc."
android:textSize="18sp"
tools:ignore="HardcodedText" />
</FrameLayout>
......@@ -74,11 +144,13 @@
app:layout_constraintBottom_toTopOf="@id/tv_btn"
app:layout_constraintTop_toBottomOf="@id/ll" />
<TextView
android:id="@+id/tv_btn"
android:layout_width="164dp"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginBottom="100dp"
android:layout_marginHorizontal="30dp"
android:layout_marginBottom="28dp"
android:background="@drawable/bg_577dfd_10"
android:gravity="center"
android:textColor="@color/white"
......
......@@ -10,54 +10,85 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|start"
android:layout_marginStart="16dp"
android:text="@string/app_name"
android:textColor="@color/black"
android:textSize="19sp"
android:textStyle="bold" />
android:layout_height="wrap_content"
android:paddingVertical="14dp">
<LinearLayout
android:id="@+id/ll_weather"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|end"
android:layout_height="36dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="14dp"
android:background="@drawable/bg_e7eef6_18"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_vip"
<TextView
android:id="@+id/tv_wendu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="5dp"
android:src="@mipmap/h_vipicon"
android:visibility="gone"
tools:ignore="ContentDescription" />
android:layout_marginStart="15dp"
android:layout_marginEnd="2dp"
android:includeFontPadding="false"
android:textColor="@color/black"
android:textSize="18sp"
tools:text="20" />
<FrameLayout
android:id="@+id/fl_setting"
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="4dp"
android:includeFontPadding="false"
android:text="℃"
android:textColor="@color/black"
tools:ignore="HardcodedText" />
android:padding="10dp"
tools:ignore="UselessParent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="6dp"
android:src="@mipmap/shezhi"
tools:ignore="ContentDescription" />
</FrameLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="9dp"
android:src="@mipmap/duoyun"
tools:ignore="ContentDescription" />
</LinearLayout>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
android:text="@string/app_name"
android:textColor="@color/black"
android:textSize="19sp"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/fl_setting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="14dp"
android:src="@mipmap/shezhi"
tools:ignore="ContentDescription" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/id_tv_xz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="58dp"
android:src="@mipmap/horoscope" />
</FrameLayout>
<androidx.core.widget.NestedScrollView
......@@ -72,11 +103,12 @@
<FrameLayout
android:id="@+id/fl_scan"
android:layout_width="280dp"
android:layout_width="match_parent"
android:layout_height="280dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-20dp">
<com.base.filerecoveryrecyclebin.view.XmlLottieAnimationView
android:id="@+id/lottie"
android:layout_width="match_parent"
......@@ -156,6 +188,7 @@
tools:ignore="ContentDescription"
tools:text="Scanned junk files 29.69MB" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -334,6 +367,11 @@
</LinearLayout>
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -31,6 +31,11 @@
android:textSize="15sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp" />
<androidx.cardview.widget.CardView
android:id="@+id/card_ry_photos"
......@@ -300,10 +305,5 @@
</androidx.cardview.widget.CardView>
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp" />
</LinearLayout>
\ No newline at end of file
......@@ -41,7 +41,10 @@
</FrameLayout>
</FrameLayout>
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="19dp"
android:layout_marginVertical="6dp"
android:background="@drawable/shape_ffffff_r10"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="18dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="12dp"
android:src="@mipmap/r_laji" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/tv_tittle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:text="Big File Cleaner"
android:textColor="#000000"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/id_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Simplity storage with a angle click"
android:textColor="#000000"
android:textSize="12sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
android:id="@+id/id_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginHorizontal="12dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="15dp"
android:gravity="center"
android:text="Clean Up Now"
android:textColor="#4773FF"
android:textSize="12sp"
android:textStyle="bold"
app:drawableEndCompat="@mipmap/jian" />
</androidx.appcompat.widget.LinearLayoutCompat>
<FrameLayout
android:id="@+id/id_fl_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="16dp">
<TextView
android:id="@+id/id_tv_time"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="11dp"
android:layout_weight="1"
android:textColor="@color/white"
android:textSize="14sp"
tools:text="Today, 25 Jun" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/id_img_icon"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginEnd="22dp"
android:src="@mipmap/x_qing" />
<TextView
android:id="@+id/id_tv_max_tmp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="17sp"
tools:text="32°/" />
<TextView
android:id="@+id/id_tv_min_tmp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="14dp"
android:textColor="@color/white"
android:textSize="14sp"
tools:text="12°" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView 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:layout_width="166dp"
android:layout_height="100dp"
android:layout_marginHorizontal="8dp"
android:layout_marginVertical="5dp"
app:cardCornerRadius="10dp">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_icon"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_gravity="center_horizontal"
android:layout_marginStart="12dp"
android:layout_marginEnd="9dp"
android:src="@mipmap/h_cleanjunk" />
<TextView
android:id="@+id/tv_tittle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="13dp"
android:includeFontPadding="false"
android:text="Battery information"
android:textColor="#ff000000"
android:textSize="15sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.cardview.widget.CardView>
\ No newline at end of file
......@@ -5,95 +5,103 @@
android:layout_margin="10dp">
<LinearLayout
android:background="@drawable/bg_ad_border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:baselineAligned="false">
<com.google.android.gms.ads.nativead.MediaView
android:id="@+id/ad_media"
android:layout_width="91dp"
android:layout_height="91dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="5dp" />
android:background="@drawable/bg_ad_border"
android:baselineAligned="false"
android:orientation="vertical">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="8dp"
android:layout_weight="1"
android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/ad_headline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/black"
android:textSize="14sp"
android:textStyle="bold" />
<com.google.android.gms.ads.nativead.MediaView
android:id="@+id/ad_media"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:layout_marginHorizontal="8dp"
android:layout_marginTop="11dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="#FF923E"
android:padding="2dp"
android:text="Ad"
android:textColor="@color/white"
android:textSize="12sp"
tools:ignore="HardcodedText" />
android:layout_marginBottom="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="4dp"
android:background="#FF923E"
android:padding="2dp"
android:text="Ad"
android:textColor="@color/white"
android:textSize="12sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/ad_headline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/black"
android:textSize="14sp"
android:textStyle="bold"
tools:text="Competition Countdown" />
</LinearLayout>
<TextView
android:id="@+id/ad_body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="10dp"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/black"
android:textSize="12sp" />
android:textSize="12sp"
tools:text="Best competitions, One App We don't run any competitions,we just show you them all in one" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="14dp">
<ImageView
android:id="@+id/ad_app_icon"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center_vertical"
tools:ignore="ContentDescription" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/ad_call_to_action"
android:layout_width="match_parent"
android:layout_height="26dp"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="12dp"
android:background="@drawable/bg_ad_button"
android:gravity="center"
android:textColor="@color/white"
android:textSize="15sp" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/ad_call_to_action"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="8dp"
android:background="@drawable/bg_ad_button"
android:gravity="center"
android:textColor="@color/white"
android:textSize="15sp" />
</LinearLayout>
</LinearLayout>
</com.google.android.gms.ads.nativead.NativeAdView>
\ No newline at end of file
</com.google.android.gms.ads.nativead.NativeAdView>
<!--<ImageView-->
<!--android:id="@+id/ad_app_icon"-->
<!--android:layout_width="30dp"-->
<!--android:layout_height="30dp"-->
<!--android:layout_gravity="center_vertical"-->
<!--android:visibility="gone"-->
<!--tools:ignore="ContentDescription" />-->
\ No newline at end of file
<com.google.android.gms.ads.nativead.NativeAdView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/bg_ad_border"
android:baselineAligned="false"
android:padding="10dp">
<com.google.android.gms.ads.nativead.MediaView
android:id="@+id/ad_media"
android:layout_width="75dp"
android:layout_height="75dp" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/ad_headline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/black"
android:textSize="14sp"
android:textStyle="bold"
tools:text="Competition Countdown" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="4dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="4dp"
android:background="#FF923E"
android:padding="2dp"
android:text="Ad"
android:textColor="@color/white"
android:textSize="12sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/ad_body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/black"
android:textSize="12sp"
tools:text="Best competitions, One App We don't run any competitions,we just show you them all in one" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/ad_call_to_action"
android:layout_width="match_parent"
android:layout_height="26dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="10dp"
android:background="@drawable/bg_ad_button"
android:gravity="center"
android:textColor="@color/white"
android:textSize="15sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</com.google.android.gms.ads.nativead.NativeAdView><!--<ImageView-->
<!--android:id="@+id/ad_app_icon"-->
<!--android:layout_width="30dp"-->
<!--android:layout_height="30dp"-->
<!--android:layout_gravity="center_vertical"-->
<!--android:visibility="gone"-->
<!--tools:ignore="ContentDescription" />-->
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat 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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ECEEFA"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/cl_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/raga_111"
android:orientation="vertical"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@mipmap/fanhui"
android:tint="@color/black" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="19sp"
android:textStyle="bold"
tools:text="Junk Cleaner" />
</androidx.appcompat.widget.LinearLayoutCompat>
<com.base.filerecoveryrecyclebin.view.XmlLottieAnimationView
android:id="@+id/ic_success"
android:layout_width="46dp"
android:layout_height="46dp"
android:layout_marginTop="40dp"
android:scaleX="6"
android:scaleY="6"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/tv_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_title"
app:lottie_autoPlay="true"
app:lottie_rawRes="@raw/new_complete" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="14dp"
android:layout_marginBottom="10dp"
android:src="@mipmap/dui" />
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
android:id="@+id/tv_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:layout_marginBottom="15dp"
android:gravity="center"
android:text="Delete successful"
android:textColor="#A1A1A1"
android:textSize="15sp"
tools:ignore="HardcodedText" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_fun"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="15dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_layout_reslut2" />
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@drawable/bg_ffffff_15">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:background="@mipmap/x_tianqibg"
tools:ignore="ContentDescription" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_wendu_now"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:layout_marginStart="20dp"
android:textColor="@color/white"
android:textSize="30sp"
tools:text="20" />
<TextView
android:id="@+id/tv_c"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/tv_wendu_now"
android:layout_toEndOf="@id/tv_wendu_now"
android:text="℃"
android:textColor="@color/white"
android:textSize="14sp"
tools:ignore="HardcodedText" />
<ImageView
android:id="@+id/iv_weather"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_alignTop="@id/tv_wendu_now"
android:layout_alignBottom="@id/tv_wendu_now"
android:layout_toEndOf="@id/tv_c"
android:src="@mipmap/d_qing"
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="22dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@mipmap/tishiicon"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/tv_city"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="4dp"
android:textColor="@color/white"
android:textSize="13sp"
tools:text="Cheney" />
</LinearLayout>
<TextView
android:id="@+id/tv_wendu_range"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="15sp"
tools:text="19℃/36℃" />
</LinearLayout>
</RelativeLayout>
</FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_ffffff_r10"
android:orientation="vertical"
android:padding="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:src="@mipmap/xingzuoicon" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/id_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Unlock the Secrets of the Universe!"
android:textColor="#000000"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="Your daily horoscope holds the answers you've
been searching for. Click now to discover them!"
android:textColor="#666666"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/fl_btn"
android:layout_width="match_parent"
android:layout_height="42dp"
android:layout_marginTop="17dp"
android:background="@drawable/shape_f_20"
android:gravity="center"
android:text="View"
android:textColor="@color/white"
android:textSize="17sp"
android:textStyle="bold" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_ffffff_10"
android:padding="10dp">
<ImageView
android:id="@+id/iv_icon"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="12dp"
android:src="@mipmap/xingzuoicon"
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical"
tools:ignore="UselessParent">
<TextView
android:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:maxLines="2"
android:text="Unlock the Secrets of the Universe!"
android:textColor="#000000"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="3dp"
android:layout_marginEnd="12dp"
android:text="Your daily horoscope holds the answers you've been searching for. Click now to discover them!"
android:textColor="#666666"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment