Commit 8881a7c0 authored by Your Name's avatar Your Name

新增引导页前加多选刷新广告+max广告切换+引流sdk+价值回传+salor的归因+去除appprcess、appmanager、whatsapp功能

parent e8114bd2
......@@ -11,7 +11,7 @@ android {
defaultConfig {
applicationId = "com.a.s"
applicationId = "com.asdqwe.ada.aaa"
minSdk = 28
targetSdk = 34
versionCode = 19
......@@ -97,6 +97,7 @@ dependencies {
implementation(libs.okhttp)
implementation(libs.logging.interceptor)
implementation(libs.solar.engine)
implementation(libs.vungle)
implementation(libs.facebook)
implementation(libs.mintegral)
......@@ -122,4 +123,5 @@ dependencies {
// debugApi ("com.squareup.leakcanary:leakcanary-android:2.12")//leakcanary
implementation ("com.facebook.shimmer:shimmer:0.5.0")
implementation(files("../app/libs/linkplayad_v1.0.0-release.aar"))
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
"client_info": {
"mobilesdk_app_id": "1:136978743377:android:7127da27894a4e56137870",
"android_client_info": {
"package_name": "com.a.s"
"package_name": "com.asdqwe.ada.aaa"
}
},
"oauth_client": [],
......
......@@ -38,6 +38,9 @@
android:supportsRtl="true"
android:theme="@style/Theme.SwiftCleanerPhoneHelper"
tools:targetApi="31">
<activity
android:name=".view.activity.ClooseFunActivity"
android:exported="false" />
<activity
android:name=".view.activity.AnimatorActivity"
android:exported="false" />
......@@ -81,24 +84,15 @@
<activity
android:name=".view.activity.SimilarPhotosActivity"
android:exported="false" />
<activity
android:name=".view.activity.WhatsAppActivity"
android:exported="false" />
<activity
android:name=".view.activity.ScreenShotActivity"
android:exported="false" />
<activity
android:name=".view.activity.LargeFileActivity"
android:exported="false" />
<activity
android:name=".view.activity.AppProcessActivity"
android:exported="false" />
<activity
android:name=".view.activity.InfoActivity"
android:exported="false" />
<activity
android:name=".view.activity.BatteryInfoActivity"
android:exported="false" />
<activity
android:name=".view.activity.EndCleanJunkActivity"
android:exported="false" />
......
......@@ -5,6 +5,7 @@ import android.app.AlarmManager
import android.app.Application
import android.app.PendingIntent
import android.app.job.JobService
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import android.os.Bundle
......@@ -15,6 +16,8 @@ import androidx.work.NetworkType
import androidx.work.PeriodicWorkRequestBuilder
import androidx.work.WorkManager
import com.bumptech.glide.Glide
import com.clean.file.b.business.newAdmob.AdmobHelps
import com.link.play.ad.LinkPlaySdk
import com.reyun.solar.engine.OnAttributionListener
import com.reyun.solar.engine.SolarEngineConfig
import com.reyun.solar.engine.SolarEngineManager
......@@ -55,12 +58,10 @@ class CleanApplication : Application() {
fun init() {
context.init()
}
fun startNotification() {
context.startNotification()
}
}
private var guideSharedPreferences: SharedPreferences? = null
override fun onCreate() {
super.onCreate()
......@@ -78,6 +79,12 @@ class CleanApplication : Application() {
if (SPUtils.getInstance().getBoolean(KEY_INIT)) init()
Thread { Glide.get(this).clearDiskCache() }.start()
//日志
LinkPlaySdk.isDebug(true)
//接口配置
// LinkPlaySdk.init(this,GlobalConfig.URL_API,GlobalConfig.PACKAGE_NAME,GlobalConfig.KEY_AES)
LinkPlaySdk.init(this,"https://feedapihk.zhangxinhulian.com","com.unamzo.pdfreader.badcc","1qd6f41dgpjsep9t")
guideSharedPreferences = getSharedPreferences("ButtonSP", MODE_PRIVATE)
}
......@@ -87,7 +94,8 @@ class CleanApplication : Application() {
private fun init() {
startNotification()
InstallReferrerUtils.init()
BlacklistUtils.requestBlacklist { AdmobManager.blacklist = it }
// BlacklistUtils.requestBlacklist { AdmobManager.blacklist = it }
BlacklistUtils.requestBlacklist { AdmobHelps.blacklist = it }
initSolar()
initFirebase()
initAlarm(1, 1800000, AlarmReceiver::class.java)
......@@ -95,8 +103,8 @@ class CleanApplication : Application() {
initAlarm(3, 1800000 * 2 * 72, Alarm2Receiver::class.java)
initWorkManager()
// BatteryReceiver.register(this)
PackageReceiver.register(this)
UnlockReceiver.register(this)
PackageReceiver.register(context)
UnlockReceiver.register(context)
}
private fun initSolar() {
......@@ -221,7 +229,7 @@ class CleanApplication : Application() {
override fun onActivityStopped(activity: Activity) {
count--
if (count == 0) {
BadgeUtils.setBadgeNum(context, 1)
// BadgeUtils.setBadgeNum(context, 1)
}
}
......
......@@ -47,10 +47,10 @@ object GlobalConfig {
// max广告位id
inline val ID_MAX_OPEN get() = "None"
inline val ID_MAX_INTER get() = "None"
inline val ID_MAX_NATIVE get() = "None"
inline val ID_MAX_BANNER get() = "None"
inline val ID_MAX_OPEN get() = "d1d943cdd3127c90"
inline val ID_MAX_INTER get() = "b31e7f6d11ee659e"
inline val ID_MAX_NATIVE get() = "96e8fe78b0efc5d1"
inline val ID_MAX_BANNER get() = "ca-app-pub-3940256099942544/9214589741"
inline val ID_MAX_REWARD get() = "None"
/**
......@@ -81,6 +81,7 @@ object GlobalConfig {
// "GGPreND6SRmCt1zJgn5faiLGD8c2PVGPLgPpSg7cHanVTud1DhtuI9MmteTqlEviaJ57WnxW68kQDaATJ5z3cW"
//
const val KEY_AD = "sAds"
const val KEY_INIT = "key_init"
const val KEY_CLEANUP_SIZE = "key_cleanup_size"
const val KEY_SCORE = "key_score"
......@@ -97,8 +98,6 @@ object GlobalConfig {
const val KEY_MALWARE_SCAN = "malware_scan_agree"
const val ID_CLEAN_JUNK = 12000
const val ID_WHATSAPP = 12010
const val ID_APPMANAGER = 12010
const val ID_BATTERY_INFO = 12020
const val ID_LARGE_FILE_CLEANER = 12030
const val ID_SIMILAR_PHOTOS = 12040
......@@ -107,7 +106,6 @@ object GlobalConfig {
const val ID_APP_UNINSTALL = 12070
const val ID_NOT_CLEANED = 12080
const val ID_BATTERY_LEVEL = 12090
const val ID_APP_PROCESS = 12100
const val ID_WHEATHER = 12087
const val ID_XINGZUO = 12088
const val ID_MALWARE_CLEAN= 12089
......
......@@ -109,6 +109,7 @@ object AdmobManager {
get() = SPUtils.getInstance().getBoolean("sAd", true)
set(value) = SPUtils.getInstance().putBoolean("sAd", value)
fun init(
context: Context,
loaded: (Int) -> Unit,
......@@ -748,12 +749,12 @@ object AdmobManager {
return dateDifference < numMilliSecondsPerHour * numHours
}
// private fun isBlacklist(): Boolean {
// return blacklist != 1
// }
private fun isBlacklist(): Boolean {
return false
private fun isBlacklist(): Boolean {
return blacklist != 1
}
// private fun isBlacklist(): Boolean {
// return false
// }
private fun checkAvailable(adUnit: String, checkIntervalTime: Boolean = false): Boolean {
if (isBlacklist()) {
......
......@@ -126,6 +126,7 @@ object ReportAdUtils {
)
roasbundle.putString(FirebaseAnalytics.Param.CURRENCY, "USD")
Firebase.analytics.logEvent("Total_Ads_Revenue_001", roasbundle)
SolarEngineEvent.eventSolar(ad, valueMicros)
taichiSharedPreferencesEditor.putFloat("TaichiTroasCache", 0f)//重新清零,开始计算
val logger = AppEventsLogger.newLogger(CleanApplication.context)
......
package com.swiftcleaner.chovey.business.admob
import com.google.android.gms.ads.appopen.AppOpenAd
import com.google.android.gms.ads.interstitial.InterstitialAd
import com.google.android.gms.ads.nativead.NativeAd
import com.google.android.gms.ads.rewarded.RewardedAd
import com.reyun.solar.engine.SolarEngineManager
import com.reyun.solar.engine.infos.SEAdImpEventModel
import com.swiftcleaner.chovey.GlobalConfig
import org.json.JSONObject
/**
* 作者:马海钊
* 时间:2025/3/12 14:13
* 功能:
*/
object SolarEngineEvent {
fun eventSolar(ad: Any?, valueMicros: Long) = Thread {
val json = JSONObject()
//变现平台
val adNetworkPlatform = "AdMob"
//聚合平台标识
val mediationPlatform = "admob"
//广告的类型
// adType 为激励视频时,只需要传入 1
// 1:激励视频
// 2:开屏
// 3:插屏
// 4:全屏视频
// 5:Banner
// 6:信息流
// 7:短视频信息流
// 8:大横幅
// 9:视频贴片
// 10:中等尺寸横幅
// 0:其它
var adType = -1
//变现平台的应用 ID
val adNetworkAppID = "ca-app-pub-3640696756167444~1506657395"
//变现平台的变现广告位 ID
var adNetworkADID = ""
//广告 ecpm,单位:元(广告千次展现的变现收入,0或负值表示没传,单位为元)
val ecpm = valueMicros / 1000.0
//货币种类
val currencyType = "USD"
when (ad) {
is AppOpenAd -> {
adType = 2
adNetworkADID = ad.adUnitId
}
is InterstitialAd -> {
adType = 3
adNetworkADID = ad.adUnitId
}
is NativeAd -> {
adType = 6
adNetworkADID = GlobalConfig.ID_ADMOB_NATIVE
}
is RewardedAd -> {
adType = 1
adNetworkADID = ad.adUnitId
}
else -> {//banner
adType = 5
adNetworkADID = GlobalConfig.ID_ADMOB_BANNER
}
}
try {
} catch (e: Exception) {
//
}
val seAdImpEventModel = SEAdImpEventModel(
adNetworkPlatform,
mediationPlatform,
adType,
adNetworkAppID,
adNetworkADID,
ecpm,
currencyType,
true,
json
)
SolarEngineManager.getInstance().trackAdImpression(seAdImpEventModel)
}.start()
}
\ No newline at end of file
......@@ -9,6 +9,10 @@ import android.widget.Button
import android.widget.FrameLayout
import android.widget.ImageView
import android.widget.TextView
import com.applovin.mediation.MaxAd
import com.applovin.mediation.nativeAds.MaxNativeAdLoader
import com.applovin.mediation.nativeAds.MaxNativeAdView
import com.applovin.mediation.nativeAds.MaxNativeAdViewBinder
import com.google.android.gms.ads.nativead.NativeAd
import com.google.android.gms.ads.nativead.NativeAdView
import com.swiftcleaner.chovey.R
......@@ -63,4 +67,25 @@ class NativeView1 @JvmOverloads constructor(
removeAllViews()
addView(adView)
}
fun setNativeAd(
nativeAdLoader: MaxNativeAdLoader,
nativeAd: MaxAd,
) {
// val layout = resource ?: R.layout.native_custom_ad_view
val binder: MaxNativeAdViewBinder =
MaxNativeAdViewBinder.Builder(layout)
.setTitleTextViewId(R.id.ad_headline)
// .setBodyTextViewId(R.id.body_text_view)
// .setAdvertiserTextViewId(R.id.advertiser_text_view)
.setIconImageViewId(R.id.ad_icon)
.setMediaContentViewGroupId(R.id.ad_media)
// .setOptionsContentViewGroupId(R.id.options_view)
// .setStarRatingContentViewGroupId(R.id.star_rating_view)
.setCallToActionButtonId(R.id.ad_call_to_action)
.build()
val adView = MaxNativeAdView(binder, context)
nativeAdLoader.render(adView, nativeAd)
removeAllViews()
addView(adView)
}
}
\ No newline at end of file
......@@ -18,19 +18,16 @@ import android.util.Log
import android.widget.RemoteViews
import androidx.core.app.NotificationCompat
import androidx.work.Configuration
import com.swiftcleaner.chovey.GlobalConfig.ID_APP_INSTALL
import com.swiftcleaner.chovey.GlobalConfig.ID_APP_PROCESS
import com.swiftcleaner.chovey.GlobalConfig.ID_BATTERY_INFO
import com.swiftcleaner.chovey.GlobalConfig.ID_CLEAN_JUNK
import com.swiftcleaner.chovey.GlobalConfig.ID_LARGE_FILE_CLEANER
import com.swiftcleaner.chovey.GlobalConfig.ID_SCREENSHOT_CLEAN
import com.swiftcleaner.chovey.GlobalConfig.KEY_NOTIFICATION_ID
import com.swiftcleaner.chovey.R
import com.swiftcleaner.chovey.business.admob.AdmobManager
import com.swiftcleaner.chovey.view.activity.AppProcessActivity
import com.swiftcleaner.chovey.view.activity.BatteryInfoActivity
import com.swiftcleaner.chovey.view.activity.CleanJunkActivity
import com.swiftcleaner.chovey.view.activity.InfoActivity
import com.swiftcleaner.chovey.view.activity.LargeFileActivity
import com.swiftcleaner.chovey.view.activity.ScreenShotActivity
import com.swiftcleaner.chovey.view.activity.StartActivity
import kotlin.random.Random
......@@ -123,7 +120,7 @@ class NotificationJobService : JobService() {
notificationLayout.setOnClickPendingIntent(R.id.id_battery, batteryPendingIntent)
notificationLayoutExpanded.setOnClickPendingIntent(R.id.id_battery, batteryPendingIntent)
val appPendingIntent = createPendingIntent(context, ID_APP_PROCESS, AppProcessActivity::class.java)
val appPendingIntent = createPendingIntent(context, ID_SCREENSHOT_CLEAN, ScreenShotActivity::class.java)
notificationLayout.setOnClickPendingIntent(R.id.id_app_manager, appPendingIntent)
notificationLayoutExpanded.setOnClickPendingIntent(R.id.id_app_manager, appPendingIntent)
......
......@@ -13,8 +13,6 @@ import android.widget.RemoteViews
import androidx.core.app.NotificationCompat
import com.tool.elite.battery.business.push.BadgeUtils
import com.swiftcleaner.chovey.CleanApplication
import com.swiftcleaner.chovey.GlobalConfig.ID_APPMANAGER
import com.swiftcleaner.chovey.GlobalConfig.ID_APP_PROCESS
import com.swiftcleaner.chovey.GlobalConfig.ID_BATTERY_INFO
import com.swiftcleaner.chovey.GlobalConfig.ID_CLEAN_JUNK
import com.swiftcleaner.chovey.GlobalConfig.ID_LARGE_FILE_CLEANER
......@@ -22,7 +20,6 @@ import com.swiftcleaner.chovey.GlobalConfig.ID_MALWARE_CLEAN
import com.swiftcleaner.chovey.GlobalConfig.ID_SCREENSHOT_CLEAN
import com.swiftcleaner.chovey.GlobalConfig.ID_SIMILAR_PHOTOS
import com.swiftcleaner.chovey.GlobalConfig.ID_WHATSAPP
import com.swiftcleaner.chovey.GlobalConfig.ID_WHEATHER
import com.swiftcleaner.chovey.GlobalConfig.ID_XINGZUO
import com.swiftcleaner.chovey.GlobalConfig.KEY_NOTIFICATION_ID
......@@ -46,12 +43,9 @@ object NotificationUtils {
private val notificationIds = intArrayOf(
ID_CLEAN_JUNK,
ID_APPMANAGER,
ID_WHATSAPP,
ID_BATTERY_INFO,
ID_LARGE_FILE_CLEANER,
ID_SIMILAR_PHOTOS,
ID_APP_PROCESS,
ID_SCREENSHOT_CLEAN,
ID_XINGZUO,
ID_WHEATHER,
......@@ -249,11 +243,8 @@ object NotificationUtils {
private fun getNotificationDetails(id: Int): Pair<Int, Int> {
return when (id) {
ID_CLEAN_JUNK -> Pair(R.mipmap.h_cleanjunk, R.string.notification_clean)
ID_WHATSAPP -> Pair(R.mipmap.h_whatsapp, R.string.notification_whatsapp)
ID_BATTERY_INFO -> Pair(R.mipmap.h_batteryinfo, R.string.notification_battery)
ID_APPMANAGER -> Pair(R.mipmap.h_appmanager, R.string.notification_manager)
ID_LARGE_FILE_CLEANER -> Pair(R.mipmap.h_large, R.string.notification_large_file)
ID_APP_PROCESS -> Pair(R.mipmap.jg__appprocss, R.string.notification_app_process)
ID_SIMILAR_PHOTOS -> Pair(R.mipmap.h_simiar, R.string.notification_similar_photos)
ID_SCREENSHOT_CLEAN -> Pair(R.mipmap.h_screenshot, R.string.notification_screenshot)
ID_MALWARE_CLEAN -> {
......@@ -397,17 +388,20 @@ object NotificationUtils {
val channel =
NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_HIGH)
channel.lockscreenVisibility = NotificationCompat.VISIBILITY_PUBLIC
channel.setShowBadge(true)
//设置ture可以开启应用消息
channel.setShowBadge(false)
notificationManager.createNotificationChannel(channel)
}
if (type.startsWith("fcm", true)) {
val num = Random.nextInt(1, 10)
val notification = builder.setNumber(num).build()
notificationManager.notify(notifyId, notification)
BadgeUtils.setBadgeNum(context, num, notification)
} else {
notificationManager.notify(notifyId, builder.build())
}
// if (type.startsWith("fcm", true)) {
// val num = Random.nextInt(1, 10)
// val notification = builder.setNumber(num).build()
// notificationManager.notify(notifyId, notification)
// BadgeUtils.setBadgeNum(context, num, notification)
// } else {
// notificationManager.notify(notifyId, builder.build())
// }
notificationManager.notify(notifyId, builder.build())
}
fun setSuspensionRetention(
......
......@@ -35,28 +35,20 @@ import android.widget.Toast;
import com.clean.file.b.business.newAdmob.AdmobHelps;
import com.gyf.immersionbar.ImmersionBar;
import com.swiftcleaner.chovey.CleanApplication;
import com.swiftcleaner.chovey.GlobalConfig;
import com.link.play.ad.LinkPlaySdk;
import com.swiftcleaner.chovey.R;
import com.swiftcleaner.chovey.business.admob.AdmobManager;
import com.swiftcleaner.chovey.business.push.NotificationUtils;
import com.swiftcleaner.chovey.databinding.ActivityMainBinding;
import com.swiftcleaner.chovey.databinding.DialogMalwareTipsBinding;
import com.swiftcleaner.chovey.model.tool.MemoryUtils;
import com.swiftcleaner.chovey.model.util.NetWork;
import com.swiftcleaner.chovey.model.util.PermissionUtils;
import com.swiftcleaner.chovey.view.activity.AnimatorActivity;
import com.swiftcleaner.chovey.view.activity.AppProcessActivity;
import com.swiftcleaner.chovey.view.activity.BatteryInfoActivity;
import com.swiftcleaner.chovey.view.activity.CleanJunkActivity;
import com.swiftcleaner.chovey.view.activity.InfoActivity;
import com.swiftcleaner.chovey.view.activity.LargeFileActivity;
import com.swiftcleaner.chovey.view.activity.ClooseFunActivity;
import com.swiftcleaner.chovey.view.activity.MalwareCleanActivity;
import com.swiftcleaner.chovey.view.activity.ScreenShotActivity;
import com.swiftcleaner.chovey.view.activity.SettingActivity;
import com.swiftcleaner.chovey.view.activity.SimilarPhotosActivity;
import com.swiftcleaner.chovey.view.activity.WhatsAppActivity;
import com.swiftcleaner.chovey.view.dialog.AppExitDialog;
import com.swiftcleaner.chovey.view.dialog.CustomBottomSheetDialog;
import com.swiftcleaner.chovey.view.dialog.FullscreenDialog;
......@@ -267,21 +259,11 @@ public class MainActivity extends AppCompatActivity {
binding.cl3CleanJunk.setOnClickListener(v -> {
initStart();
});
binding.cl3AppManager.setOnClickListener(v -> {
Intent intent = new Intent(this, AnimatorActivity.class);
intent.putExtra("animator",7);
startActivity(intent);
});
binding.cl3BatteryInfo.setOnClickListener(v -> {
Intent intent = new Intent(this, AnimatorActivity.class);
intent.putExtra("animator",2);
startActivity(intent);
});
binding.appProcess.setOnClickListener(v -> {
Intent intent = new Intent(this, AnimatorActivity.class);
intent.putExtra("animator",6);
startActivity(intent);
});
binding.largeFileCleaner.setOnClickListener(v -> {
Intent intent = new Intent(this, AnimatorActivity.class);
intent.putExtra("animator",3);
......@@ -292,11 +274,6 @@ public class MainActivity extends AppCompatActivity {
intent.putExtra("animator",4);
startActivity(intent);
});
binding.whatsApp.setOnClickListener(v -> {
Intent intent = new Intent(this, AnimatorActivity.class);
intent.putExtra("animator",8);
startActivity(intent);
});
binding.similarPhotos.setOnClickListener(v -> {
startActivity(new Intent(MainActivity.this, SimilarPhotosActivity.class));
});
......@@ -483,6 +460,7 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onResume() {
super.onResume();
LinkPlaySdk.showView(this);
if (isCleaned() && fullscreenDialog != null) {
Log.d("isCleaned", isCleaned() + "222");
fullscreenDialog.dismiss();
......@@ -496,7 +474,7 @@ public class MainActivity extends AppCompatActivity {
if (bannerShowed.get()) return;
bannerShowed.set(true);
if (AdmobManager.INSTANCE.isShowAdBanner()){
if (AdmobHelps.INSTANCE.isShowAdBanner()){
AdmobHelps.INSTANCE.showBannerAd(this, binding.flBanner, "bottom", null, null);
}
......
......@@ -58,18 +58,6 @@ public class AnimatorActivity extends BaseActivity<ActivityAnimatorBinding> {
startIntent.putExtra("cleanstr", stringExtra);
startIntent.putExtra("title",title);
break;
case 6:
binding.tupian.setBackgroundResource(R.mipmap.appprocess_img);
startIntent = new Intent(this, AppProcessActivity.class);
break;
case 7:
binding.tupian.setBackgroundResource(R.mipmap.app_manager_img);
startIntent = new Intent(this, BatteryInfoActivity.class);
break;
case 8:
binding.tupian.setBackgroundResource(R.mipmap.whatsapp_img);
startIntent = new Intent(this, WhatsAppActivity.class);
break;
default:
Log.e("AnimatorActivity", "Invalid animator intent value: " + animatorIntent);
}
......@@ -110,7 +98,7 @@ public class AnimatorActivity extends BaseActivity<ActivityAnimatorBinding> {
Log.d("AdmobHelps", "Interstitial Ad failed to load.");
return null;
},
false
false,false
);
}else {
startInt();
......
......@@ -615,7 +615,7 @@ public class CleanJunkActivity extends BaseActivity<ActivityCleanJunkBinding> {
Log.d("AdmobHelps", "Interstitial Ad failed to load.");
return null;
},
false
false,false
);
}else {
FinishMain.INSTANCE.finishToMain(activity);
......
package com.swiftcleaner.chovey.view.activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.fragment.app.FragmentStatePagerAdapter;
import androidx.viewpager.widget.ViewPager;
import com.clean.file.b.business.newAdmob.AdmobHelps;
import com.gyf.immersionbar.ImmersionBar;
import com.swiftcleaner.chovey.R;
import com.swiftcleaner.chovey.business.EventUtils;
import com.swiftcleaner.chovey.databinding.ActivityClooseFunBinding;
import com.swiftcleaner.chovey.databinding.ActivityGuideBinding;
import com.swiftcleaner.chovey.model.util.FinishMain;
import com.swiftcleaner.chovey.view.adapter.ViewPagerAdapter;
public class ClooseFunActivity extends AppCompatActivity {
ActivityClooseFunBinding binding;
private long lastClickTime = 0; // 记录上次点击的时间
private static final long MIN_CLICK_INTERVAL = 300; // 设置最小点击间隔
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityClooseFunBinding.inflate(getLayoutInflater());
View view = binding.getRoot();
setContentView(view);
initBar();
EventUtils.INSTANCE.event("page_ClooseFunActivity", "", null);
initView();
}
private void adMob() {
new Thread(() -> {
runOnUiThread(() -> {
AdmobHelps.INSTANCE.showNativeAd(this, binding.flAd, R.layout.layout_ad_native_small, AdmobHelps.INSTANCE.isShowAdNativeBottom(), false);
});
}).start();
}
private void handleItemClick(Runnable action) {
long currentTime = System.currentTimeMillis();
if (currentTime - lastClickTime >= MIN_CLICK_INTERVAL) {
lastClickTime = currentTime;
action.run();
}
}
private void initView() {
adMob();
binding.tvText.setOnClickListener(v->{
FinishMain.INSTANCE.finishToMain(this);
});
binding.cl1.setOnClickListener(v->{
handleItemClick(() -> {
boolean isChecked = binding.checkPhoto.isChecked();
binding.checkPhoto.setChecked(!isChecked);
if (AdmobHelps.INSTANCE.isShowAdClooseNative() && !isChecked) {
adMob();
}
});
});
binding.cl2.setOnClickListener(v->{
handleItemClick(() -> {
boolean isChecked = binding.checkVideo.isChecked();
binding.checkVideo.setChecked(!isChecked);
if (AdmobHelps.INSTANCE.isShowAdClooseNative() && !isChecked) {
adMob();
}
});
});
binding.cl3.setOnClickListener(v->{
handleItemClick(() -> {
boolean isChecked = binding.checkAudio.isChecked();
binding.checkAudio.setChecked(!isChecked);
if (AdmobHelps.INSTANCE.isShowAdClooseNative() && !isChecked) {
adMob();
}
});
});
binding.cl4.setOnClickListener(v->{
handleItemClick(() -> {
boolean isChecked = binding.checkDocument.isChecked();
binding.checkDocument.setChecked(!isChecked);
if (AdmobHelps.INSTANCE.isShowAdClooseNative() && !isChecked) {
adMob();
}
});
});
binding.tvContinue.setOnClickListener(v->{
handleItemClick(() -> {
startActivity(new Intent(this,GuideActivity.class));
finish();
});
});
}
private void initBar() {
ImmersionBar.with(this)
.transparentStatusBar() // 透明状态栏
.statusBarDarkFont(true) // 状态栏字体颜色为深色
.navigationBarDarkIcon(false) // 导航栏图标颜色为浅色
.init();
}
}
\ No newline at end of file
......@@ -66,7 +66,8 @@ public class CollectActivity extends AppCompatActivity {
checkAndRequestPermissions();
});
binding.scanSkip.setOnClickListener(v->{
initStart();
startActivity(new Intent(this, MainActivity.class));
finish();
});
}
......
......@@ -61,24 +61,6 @@ public class EndCleanJunkActivity extends BaseActivity<ActivityEndCleanJunkBindi
startActivity(intent1);
finish();
});
binding.buttonAppManagerCheckNo.setOnClickListener(v -> {
Intent intent1 = new Intent(this, AnimatorActivity.class);
intent1.putExtra("animator",7);
startActivity(intent1);
finish();
});
binding.buttonWhatsappCheckNo.setOnClickListener(v -> {
Intent intent1 = new Intent(this, AnimatorActivity.class);
intent1.putExtra("animator",8);
startActivity(intent1);
finish();
});
binding.buttonAppProcessCheckNo.setOnClickListener(v -> {
Intent intent1 = new Intent(this, AnimatorActivity.class);
intent1.putExtra("animator",6);
startActivity(intent1);
finish();
});
binding.buttonCleanJunkCleanNo.setOnClickListener(v -> {
Intent intent1 = new Intent(this, AnimatorActivity.class);
intent1.putExtra("animator",1);
......@@ -146,7 +128,7 @@ public class EndCleanJunkActivity extends BaseActivity<ActivityEndCleanJunkBindi
Log.d("AdmobHelps", "Interstitial Ad failed to load.");
return null;
},
false
false,false
);
}else {
FinishMain.INSTANCE.finishToMain(EndCleanJunkActivity.this);
......
......@@ -49,7 +49,8 @@ public class GuideActivity extends AppCompatActivity {
EventUtils.INSTANCE.event("page_GuideActivity", "", null);
adapter = new ViewPagerAdapter(getSupportFragmentManager(), FragmentStatePagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
binding.viewPager.setAdapter(adapter);
binding.viewPager.setPagingEnabled(false);
binding.viewPager.setPagingEnabled(true
);
binding.viewPager.addOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
@Override
public void onPageSelected(int position) {
......@@ -101,7 +102,7 @@ public class GuideActivity extends AppCompatActivity {
Log.d("AdmobHelps", "Interstitial Ad failed to load.");
return null;
},
false
false,false
);
}else {
startIntent();
......
......@@ -198,7 +198,7 @@ public class InfoActivity extends BaseActivity<ActivityInfoBinding> {
Log.d("AdmobHelps", "Interstitial Ad failed to load.");
return null;
},
false
false,false
);
}else {
FinishMain.INSTANCE.finishToMain(activity);
......
......@@ -304,7 +304,7 @@ public class LargeFileActivity extends BaseActivity<ActivityLargeFileBinding> {
Log.d("AdmobHelps", "Interstitial Ad failed to load.");
return null;
},
false
false,false
);
}else {
FinishMain.INSTANCE.finishToMain(activity);
......
......@@ -319,7 +319,7 @@ public class ScreenShotActivity extends BaseActivity<ActivityScreenShotBinding>
Log.d("AdmobHelps", "Interstitial Ad failed to load.");
return null;
},
false
false,false
);
}else {
FinishMain.INSTANCE.finishToMain(activity);
......
package com.swiftcleaner.chovey.view.activity;
import static com.swiftcleaner.chovey.GlobalConfig.ID_APPMANAGER;
import static com.swiftcleaner.chovey.GlobalConfig.ID_APP_PROCESS;
import static com.swiftcleaner.chovey.GlobalConfig.ID_BATTERY_INFO;
import static com.swiftcleaner.chovey.GlobalConfig.ID_CLEAN_JUNK;
import static com.swiftcleaner.chovey.GlobalConfig.ID_LARGE_FILE_CLEANER;
import static com.swiftcleaner.chovey.GlobalConfig.ID_MALWARE_CLEAN;
import static com.swiftcleaner.chovey.GlobalConfig.ID_SCREENSHOT_CLEAN;
import static com.swiftcleaner.chovey.GlobalConfig.ID_SIMILAR_PHOTOS;
import static com.swiftcleaner.chovey.GlobalConfig.ID_WHATSAPP;
import static com.swiftcleaner.chovey.GlobalConfig.ID_WHEATHER;
import static com.swiftcleaner.chovey.GlobalConfig.ID_XINGZUO;
import static com.swiftcleaner.chovey.GlobalConfig.URL_PRIVACY;
import androidx.appcompat.app.AppCompatActivity;
......@@ -32,13 +21,10 @@ import android.widget.ImageView;
import android.widget.Toast;
import com.gyf.immersionbar.ImmersionBar;
import com.swiftcleaner.chovey.CleanApplication;
import com.swiftcleaner.chovey.GlobalConfig;
import com.swiftcleaner.chovey.R;
import com.swiftcleaner.chovey.business.EventUtils;
import com.swiftcleaner.chovey.business.admob.AdmobManager;
import com.swiftcleaner.chovey.business.push.NotificationUtils;
import com.swiftcleaner.chovey.databinding.ActivityMainBinding;
import com.swiftcleaner.chovey.databinding.ActivitySettingBinding;
import com.swiftcleaner.chovey.util.SPUtils;
import com.swiftcleaner.chovey.view.dialog.CustomScoreDialog;
......
package com.swiftcleaner.chovey.view.adapter;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.provider.Settings;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatButton;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.swiftcleaner.chovey.R;
import com.swiftcleaner.chovey.model.bean.AppInfo;
import com.swiftcleaner.chovey.model.bean.AppInfoBean;
import java.util.List;
public class AppInfoAdapter extends RecyclerView.Adapter<AppInfoAdapter.AppInfoViewHolder> {
private List<AppInfoBean> appList;
Context context;
public AppInfoAdapter(List<AppInfoBean> appList, Context context) {
this.appList = appList;
this.context = context;
}
@NonNull
@Override
public AppInfoViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_battery_list, parent, false);
return new AppInfoViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull AppInfoViewHolder holder, int position) {
AppInfoBean appInfoBean = appList.get(position);
holder.button_delete.setOnClickListener(v->{
// 卸载应用
Intent intentUninstall = new Intent(Intent.ACTION_DELETE);
intentUninstall.setData(Uri.parse("package:" + appInfoBean.getPackageName()));
context.startActivity(intentUninstall);
appList.remove(appInfoBean);
});
Glide.with(context)
.load(appInfoBean.getAppIcon())
.apply(new RequestOptions().transform(new RoundedCorners(10)))
.error(R.mipmap.ic_launcher)
.placeholder(R.mipmap.ic_launcher)
.into(holder.icon);
holder.appName.setText(appInfoBean.getAppName());
// holder.memoryUsage.setText(String.format("", formatMemoryUsage(appInfoBean.)));
}
@Override
public int getItemCount() {
return appList.size();
}
public static class AppInfoViewHolder extends RecyclerView.ViewHolder {
ImageView icon;
TextView appName;
TextView memoryUsage;
AppCompatButton button_delete;
public AppInfoViewHolder(@NonNull View itemView) {
super(itemView);
icon = itemView.findViewById(R.id.item_battery_img);
appName = itemView.findViewById(R.id.item_battery_name);
memoryUsage = itemView.findViewById(R.id.item_battery_memory_number);
button_delete = itemView.findViewById(R.id.item_button_battery_delete);
}
}
}
package com.swiftcleaner.chovey.view.adapter;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.provider.Settings;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatButton;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.swiftcleaner.chovey.R;
import com.swiftcleaner.chovey.model.bean.AppInfo;
import com.swiftcleaner.chovey.model.bean.AppInfoBean;
import java.util.List;
public class AppProcessAdapter extends RecyclerView.Adapter<AppProcessAdapter.AppInfoViewHolder> {
private List<AppInfoBean> appList;
Context context;
public AppProcessAdapter(List<AppInfoBean> appList, Context context) {
this.appList = appList;
this.context = context;
}
@NonNull
@Override
public AppInfoViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_app_process_list, parent, false);
return new AppInfoViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull AppInfoViewHolder holder, int position) {
AppInfoBean appInfo = appList.get(position);
holder.button_delete.setOnClickListener(v->{
// 打开应用详情页(进程)
Intent intentAppDetails = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
intentAppDetails.setData(Uri.parse("package:" + appInfo.getPackageName()));
context.startActivity(intentAppDetails);
});
Glide.with(context)
.load(appInfo.getAppIcon())
.apply(new RequestOptions().transform(new RoundedCorners(10)))
.error(R.mipmap.ic_launcher)
.placeholder(R.mipmap.ic_launcher)
.into(holder.icon);
holder.appName.setText(appInfo.getAppName());
}
@Override
public int getItemCount() {
return appList.size();
}
public static class AppInfoViewHolder extends RecyclerView.ViewHolder {
ImageView icon;
TextView appName;
AppCompatButton button_delete;
public AppInfoViewHolder(@NonNull View itemView) {
super(itemView);
icon = itemView.findViewById(R.id.item_battery_img);
appName = itemView.findViewById(R.id.item_battery_name);
button_delete = itemView.findViewById(R.id.item_button_battery_delete);
}
}
}
package com.swiftcleaner.chovey.view.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.swiftcleaner.chovey.R;
import com.swiftcleaner.chovey.model.bean.CleanFileBean;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
public class WhatsAppCleanAdapter extends RecyclerView.Adapter<WhatsAppCleanAdapter.AppInfoViewHolder> {
private List<CleanFileBean> list;
private OnItemClickListener listener;
public WhatsAppCleanAdapter(List<CleanFileBean> list, OnItemClickListener listener) {
this.list = list;
this.listener = listener;
}
@NonNull
@Override
public AppInfoViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_clean_list_min, parent, false);
return new AppInfoViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull AppInfoViewHolder holder, int position) {
CleanFileBean fileInfo = list.get(position);
if (fileInfo!=null&&fileInfo.getPath()!=null){
Glide.with(holder.itemView.getContext())
.load(R.mipmap.l_tu)
.apply(new RequestOptions().transform(new RoundedCorners(10)))
.error(R.mipmap.ic_launcher)
.placeholder(R.mipmap.ic_launcher)
.into(holder.apk_icon);
holder.apk_Name.setText(fileInfo.getName());
holder.apk_number.setText(formatFileSize(fileInfo.getLength()));
holder.apk_checked.setChecked(fileInfo.isSelected());
holder.itemView.setOnClickListener(v -> {
// 切换选中状态
fileInfo.setSelected(!fileInfo.isSelected());
// 通知数据变化,更新视图
notifyItemChanged(position);
// 如果设置了点击事件监听器,则回调
if (listener != null) {
listener.onItemClick(fileInfo);
}
});
}
}
private String formatFileSize(long size) {
if (size <= 0) return "0 Bytes";
final String[] units = new String[]{"Bytes", "KB", "MB", "GB", "TB"};
int digitGroups = (int) (Math.log10(size) / Math.log10(1024));
return new DecimalFormat("#,##0.#").format(size / Math.pow(1024, digitGroups)) + " " + units[digitGroups];
}
@Override
public int getItemCount() {
return list.size();
}
public List<CleanFileBean> getSelectedFiles() {
List<CleanFileBean> selectedFiles = new ArrayList<>();
for (CleanFileBean fileBean : list) {
if (fileBean.isSelected()) {
selectedFiles.add(fileBean);
}
}
return selectedFiles;
}
public void removeSelectedFiles(List<CleanFileBean> selectedFiles) {
list.removeAll(selectedFiles);
notifyDataSetChanged(); // 通知适配器数据已更改
}
public void setAllChecked(boolean isChecked) {
for (CleanFileBean fileBean : list) {
fileBean.setSelected(isChecked);
}
notifyDataSetChanged(); // 通知适配器数据已更改
}
public boolean isAllChecked() {
for (CleanFileBean fileBean : list) {
if (!fileBean.isSelected()) {
return false;
}
}
return true;
}
public static class AppInfoViewHolder extends RecyclerView.ViewHolder {
ImageView apk_icon;
TextView apk_Name, apk_number;
CheckBox apk_checked;
public AppInfoViewHolder(@NonNull View itemView) {
super(itemView);
apk_icon = itemView.findViewById(R.id.item_clean_list_file_img);
apk_Name = itemView.findViewById(R.id.item_clean_list_file_name);
apk_checked = itemView.findViewById(R.id.item_clean_list_file_checkout);
apk_number = itemView.findViewById(R.id.item_clean_list_file_number);
}
}
public interface OnItemClickListener {
void onItemClick(CleanFileBean fileBean);
}
}
package com.swiftcleaner.chovey.view.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.swiftcleaner.chovey.R;
import com.swiftcleaner.chovey.model.bean.CleanFileBean;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
public class WhatsAppCleanAudioAdapter extends RecyclerView.Adapter<WhatsAppCleanAudioAdapter.AppInfoViewHolder> {
private List<CleanFileBean> list;
private OnItemClickListener listener;
public WhatsAppCleanAudioAdapter(List<CleanFileBean> list, OnItemClickListener listener) {
this.list = list;
this.listener = listener;
}
@NonNull
@Override
public AppInfoViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_clean_list_min, parent, false);
return new AppInfoViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull AppInfoViewHolder holder, int position) {
CleanFileBean fileInfo = list.get(position);
if (fileInfo!=null&&fileInfo.getPath()!=null){
Glide.with(holder.itemView.getContext())
.load(fileInfo.getPath())
.apply(new RequestOptions().transform(new RoundedCorners(10)))
.error(R.mipmap.ic_launcher)
.placeholder(R.mipmap.ic_launcher)
.into(holder.apk_icon);
holder.apk_Name.setText(fileInfo.getName());
holder.apk_number.setText(formatFileSize(fileInfo.getLength()));
holder.apk_checked.setChecked(fileInfo.isSelected());
holder.itemView.setOnClickListener(v -> {
// 切换选中状态
fileInfo.setSelected(!fileInfo.isSelected());
// 通知数据变化,更新视图
notifyItemChanged(position);
// 如果设置了点击事件监听器,则回调
if (listener != null) {
listener.onItemClick(fileInfo);
}
});
}
}
private String formatFileSize(long size) {
if (size <= 0) return "0 Bytes";
final String[] units = new String[]{"Bytes", "KB", "MB", "GB", "TB"};
int digitGroups = (int) (Math.log10(size) / Math.log10(1024));
return new DecimalFormat("#,##0.#").format(size / Math.pow(1024, digitGroups)) + " " + units[digitGroups];
}
@Override
public int getItemCount() {
return list.size();
}
public List<CleanFileBean> getSelectedFiles() {
List<CleanFileBean> selectedFiles = new ArrayList<>();
for (CleanFileBean fileBean : list) {
if (fileBean.isSelected()) {
selectedFiles.add(fileBean);
}
}
return selectedFiles;
}
public void removeSelectedFiles(List<CleanFileBean> selectedFiles) {
list.removeAll(selectedFiles);
notifyDataSetChanged(); // 通知适配器数据已更改
}
public void setAllChecked(boolean isChecked) {
for (CleanFileBean fileBean : list) {
fileBean.setSelected(isChecked);
}
notifyDataSetChanged(); // 通知适配器数据已更改
}
public boolean isAllChecked() {
for (CleanFileBean fileBean : list) {
if (!fileBean.isSelected()) {
return false;
}
}
return true;
}
public static class AppInfoViewHolder extends RecyclerView.ViewHolder {
ImageView apk_icon;
TextView apk_Name, apk_number;
CheckBox apk_checked;
public AppInfoViewHolder(@NonNull View itemView) {
super(itemView);
apk_icon = itemView.findViewById(R.id.item_clean_list_file_img);
apk_Name = itemView.findViewById(R.id.item_clean_list_file_name);
apk_checked = itemView.findViewById(R.id.item_clean_list_file_checkout);
apk_number = itemView.findViewById(R.id.item_clean_list_file_number);
}
}
public interface OnItemClickListener {
void onItemClick(CleanFileBean fileBean);
}
}
package com.swiftcleaner.chovey.view.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.swiftcleaner.chovey.R;
import com.swiftcleaner.chovey.model.bean.CleanFileBean;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
public class WhatsAppCleanImageAdapter extends RecyclerView.Adapter<WhatsAppCleanImageAdapter.AppInfoViewHolder> {
private List<CleanFileBean> list;
private OnItemClickListener listener;
public WhatsAppCleanImageAdapter(List<CleanFileBean> list, OnItemClickListener listener) {
this.list = list;
this.listener = listener;
}
@NonNull
@Override
public AppInfoViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_clean_list_min, parent, false);
return new AppInfoViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull AppInfoViewHolder holder, int position) {
CleanFileBean fileInfo = list.get(position);
if (fileInfo!=null&&fileInfo.getPath()!=null){
Glide.with(holder.itemView.getContext())
.load(fileInfo.getPath())
.apply(new RequestOptions().transform(new RoundedCorners(10)))
.error(R.mipmap.ic_launcher)
.placeholder(R.mipmap.ic_launcher)
.into(holder.apk_icon);
holder.apk_Name.setText(fileInfo.getName());
holder.apk_number.setText(formatFileSize(fileInfo.getLength()));
holder.apk_checked.setChecked(fileInfo.isSelected());
holder.itemView.setOnClickListener(v -> {
// 切换选中状态
fileInfo.setSelected(!fileInfo.isSelected());
// 通知数据变化,更新视图
notifyItemChanged(position);
// 如果设置了点击事件监听器,则回调
if (listener != null) {
listener.onItemClick(fileInfo);
}
});
}
}
private String formatFileSize(long size) {
if (size <= 0) return "0 Bytes";
final String[] units = new String[]{"Bytes", "KB", "MB", "GB", "TB"};
int digitGroups = (int) (Math.log10(size) / Math.log10(1024));
return new DecimalFormat("#,##0.#").format(size / Math.pow(1024, digitGroups)) + " " + units[digitGroups];
}
@Override
public int getItemCount() {
return list.size();
}
public List<CleanFileBean> getSelectedFiles() {
List<CleanFileBean> selectedFiles = new ArrayList<>();
for (CleanFileBean fileBean : list) {
if (fileBean.isSelected()) {
selectedFiles.add(fileBean);
}
}
return selectedFiles;
}
public void removeSelectedFiles(List<CleanFileBean> selectedFiles) {
list.removeAll(selectedFiles);
notifyDataSetChanged(); // 通知适配器数据已更改
}
public void setAllChecked(boolean isChecked) {
for (CleanFileBean fileBean : list) {
fileBean.setSelected(isChecked);
}
notifyDataSetChanged(); // 通知适配器数据已更改
}
public boolean isAllChecked() {
for (CleanFileBean fileBean : list) {
if (!fileBean.isSelected()) {
return false;
}
}
return true;
}
public static class AppInfoViewHolder extends RecyclerView.ViewHolder {
ImageView apk_icon;
TextView apk_Name, apk_number;
CheckBox apk_checked;
public AppInfoViewHolder(@NonNull View itemView) {
super(itemView);
apk_icon = itemView.findViewById(R.id.item_clean_list_file_img);
apk_Name = itemView.findViewById(R.id.item_clean_list_file_name);
apk_checked = itemView.findViewById(R.id.item_clean_list_file_checkout);
apk_number = itemView.findViewById(R.id.item_clean_list_file_number);
}
}
public interface OnItemClickListener {
void onItemClick(CleanFileBean fileBean);
}
}
package com.swiftcleaner.chovey.view.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.swiftcleaner.chovey.R;
import com.swiftcleaner.chovey.model.bean.CleanFileBean;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
public class WhatsAppCleanVideoAdapter extends RecyclerView.Adapter<WhatsAppCleanVideoAdapter.AppInfoViewHolder> {
private List<CleanFileBean> list;
private OnItemClickListener listener;
public WhatsAppCleanVideoAdapter(List<CleanFileBean> list, OnItemClickListener listener) {
this.list = list;
this.listener = listener;
}
@NonNull
@Override
public AppInfoViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_clean_list_min, parent, false);
return new AppInfoViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull AppInfoViewHolder holder, int position) {
CleanFileBean fileInfo = list.get(position);
if (fileInfo!=null&&fileInfo.getPath()!=null){
Glide.with(holder.itemView.getContext())
.load(fileInfo.getPath())
.apply(new RequestOptions().transform(new RoundedCorners(10)))
.error(R.mipmap.ic_launcher)
.placeholder(R.mipmap.ic_launcher)
.into(holder.apk_icon);
holder.apk_Name.setText(fileInfo.getName());
holder.apk_number.setText(formatFileSize(fileInfo.getLength()));
holder.apk_checked.setChecked(fileInfo.isSelected());
holder.itemView.setOnClickListener(v -> {
// 切换选中状态
fileInfo.setSelected(!fileInfo.isSelected());
// 通知数据变化,更新视图
notifyItemChanged(position);
// 如果设置了点击事件监听器,则回调
if (listener != null) {
listener.onItemClick(fileInfo);
}
});
}
}
private String formatFileSize(long size) {
if (size <= 0) return "0 Bytes";
final String[] units = new String[]{"Bytes", "KB", "MB", "GB", "TB"};
int digitGroups = (int) (Math.log10(size) / Math.log10(1024));
return new DecimalFormat("#,##0.#").format(size / Math.pow(1024, digitGroups)) + " " + units[digitGroups];
}
@Override
public int getItemCount() {
return list.size();
}
public List<CleanFileBean> getSelectedFiles() {
List<CleanFileBean> selectedFiles = new ArrayList<>();
for (CleanFileBean fileBean : list) {
if (fileBean.isSelected()) {
selectedFiles.add(fileBean);
}
}
return selectedFiles;
}
public void removeSelectedFiles(List<CleanFileBean> selectedFiles) {
list.removeAll(selectedFiles);
notifyDataSetChanged(); // 通知适配器数据已更改
}
public void setAllChecked(boolean isChecked) {
for (CleanFileBean fileBean : list) {
fileBean.setSelected(isChecked);
}
notifyDataSetChanged(); // 通知适配器数据已更改
}
public boolean isAllChecked() {
for (CleanFileBean fileBean : list) {
if (!fileBean.isSelected()) {
return false;
}
}
return true;
}
public static class AppInfoViewHolder extends RecyclerView.ViewHolder {
ImageView apk_icon;
TextView apk_Name, apk_number;
CheckBox apk_checked;
public AppInfoViewHolder(@NonNull View itemView) {
super(itemView);
apk_icon = itemView.findViewById(R.id.item_clean_list_file_img);
apk_Name = itemView.findViewById(R.id.item_clean_list_file_name);
apk_checked = itemView.findViewById(R.id.item_clean_list_file_checkout);
apk_number = itemView.findViewById(R.id.item_clean_list_file_number);
}
}
public interface OnItemClickListener {
void onItemClick(CleanFileBean fileBean);
}
}
......@@ -15,7 +15,6 @@ import com.clean.file.b.business.newAdmob.AdmobHelps;
import com.swiftcleaner.chovey.R;
import com.swiftcleaner.chovey.business.admob.AdmobManager;
import com.swiftcleaner.chovey.business.admob.NativeView;
import com.swiftcleaner.chovey.view.activity.AppProcessActivity;
public class AppExitDialog extends Dialog {
......@@ -79,7 +78,6 @@ public class AppExitDialog extends Dialog {
}
}.start();
setCanceledOnTouchOutside(false);
FrameLayout nativeView = findViewById(R.id.fl_ad);
......
......@@ -42,7 +42,7 @@ public class CustomScoreDialog extends Dialog {
FrameLayout nativeView = findViewById(R.id.fl_ad);
if (!isDialogDestroyed){
AdmobHelps.INSTANCE.showNativeAd(activity,nativeView,R.layout.layout_ad_native_small,AdmobHelps.INSTANCE.isShowAdNativeBottom(),false);
AdmobHelps.INSTANCE.showNativeAd(activity,nativeView,R.layout.layout_ad_native_small,AdmobHelps.INSTANCE.isShowAdNativeExitFunction(),false);
}
dialog_cancel.setOnClickListener(v -> {
......
......@@ -19,7 +19,6 @@ import com.swiftcleaner.chovey.R;
import com.swiftcleaner.chovey.business.admob.AdmobManager;
import com.swiftcleaner.chovey.business.admob.NativeView;
import com.swiftcleaner.chovey.view.MainActivity;
import com.swiftcleaner.chovey.view.activity.AppProcessActivity;
import com.swiftcleaner.chovey.view.activity.GuideActivity;
import io.reactivex.rxjava3.annotations.Nullable;
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@mipmap/whick_xuan" android:state_checked="true" />
<item android:drawable="@mipmap/whick_weixuan" android:state_checked="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="#99EBF3FF" />
<corners android:radius="16dp" />
<stroke
android:width="1dp"
android:color="#E6E6E6" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="#EBF3FF" />
<corners android:radius="16dp" />
<stroke
android:width="1dp"
android:color="#E6E6E6" />
</shape>
</item>
</selector>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".view.activity.AppProcessActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:layout_width="match_parent"
android:layout_height="88dp"
android:background="@drawable/shape_left_right_blue"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/app_process_cl1"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="44dp"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_return"
android:layout_width="19dp"
android:layout_height="19dp"
android:layout_marginStart="16dp"
android:src="@mipmap/fanhui"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="App Process"
android:textColor="#FFFFFF"
android:textSize="19sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/app_process_text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="28dp"
android:gravity="center"
android:text="Space Used"
android:textColor="#000000"
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_process_cl1" />
<TextView
android:id="@+id/app_process_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="50"
android:textColor="#000000"
android:textSize="50sp"
app:layout_constraintStart_toStartOf="@id/app_process_text1"
app:layout_constraintTop_toBottomOf="@id/app_process_text1" />
<TextView
android:id="@+id/app_process_text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginBottom="8dp"
android:gravity="center"
android:text="%"
android:textColor="#000000"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@id/app_process_num"
app:layout_constraintStart_toEndOf="@id/app_process_num" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/app_process_cl2"
android:layout_width="match_parent"
android:layout_height="34dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="14dp"
android:background="@drawable/shpae_app_process_back"
app:layout_constraintTop_toBottomOf="@id/app_process_text2">
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:max="100"
android:progress="0"
android:progressDrawable="@drawable/custom_progress_bar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/memoryInfo_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:gravity="center"
android:text="11"
android:textColor="#000000"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
app:layout_constraintTop_toBottomOf="@id/app_process_cl2">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@mipmap/img_adzhanwei_small"/>
</FrameLayout>
<TextView
android:id="@+id/app_process_text3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="10dp"
android:text="Running background apps"
android:textColor="#999999"
android:textSize="15sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/fl_ad" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/app_process_recy"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:overScrollMode="never"
app:layout_constraintBottom_toTopOf="@id/cl5"
app:layout_constraintTop_toBottomOf="@id/app_process_text3" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl5"
android:layout_width="match_parent"
android:layout_height="80dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/app_process_button_ok"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:background="@drawable/shape_clean_up"
android:gravity="center"
android:text="Skip"
android:textColor="#FFFFFF"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".view.activity.BatteryInfoActivity">
<View
android:layout_width="match_parent"
android:layout_height="88dp"
android:background="@drawable/shape_left_right_blue"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/battery_cl1"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="44dp"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_return"
android:layout_width="19dp"
android:layout_height="19dp"
android:layout_marginStart="16dp"
android:src="@mipmap/fanhui"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="App Manager"
android:textColor="#FFFFFF"
android:textSize="19sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
app:layout_constraintTop_toBottomOf="@id/battery_cl1">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@mipmap/img_adzhanwei_small"/>
</FrameLayout>
<TextView
android:id="@+id/tv_battery_info_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="Installed applications"
android:textColor="#000000"
android:textSize="15sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/fl_ad" />
<TextView
android:id="@+id/tv_battery_info_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="(85 in total)"
android:textColor="#03A9F4"
android:textSize="15sp"
app:layout_constraintStart_toEndOf="@id/tv_battery_info_text"
app:layout_constraintTop_toBottomOf="@id/fl_ad" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/battery_recy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="17dp"
android:layout_marginTop="10dp"
app:layout_constraintTop_toBottomOf="@id/tv_battery_info_num"
android:overScrollMode="never"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/id_activity_appmanager_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="loading..."
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -118,8 +118,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
app:layout_constraintTop_toBottomOf="@id/battery_cl1">
android:layout_marginTop="10dp">
<ImageView
android:layout_width="match_parent"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
tools:context=".view.activity.ClooseFunActivity">
<TextView
android:id="@+id/tv_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="35dp"
android:layout_marginTop="64dp"
android:gravity="center"
android:text="Which type do you want to clean?"
android:textColor="#111111"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl1"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="20dp"
android:background="@drawable/shape_which_bg"
app:layout_constraintTop_toBottomOf="@id/tv_text">
<ImageView
android:id="@+id/iv_photo"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:scaleType="fitXY"
android:src="@mipmap/icon_photo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="Photo"
android:textColor="#111111"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_photo"
app:layout_constraintTop_toTopOf="parent" />
<CheckBox
android:id="@+id/check_photo"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginEnd="10dp"
android:button="@null"
android:drawableStart="@drawable/check"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl2"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="20dp"
android:background="@drawable/shape_which_bg"
app:layout_constraintTop_toBottomOf="@id/cl1">
<ImageView
android:id="@+id/iv_video"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:scaleType="fitXY"
android:src="@mipmap/icon_video"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="Video"
android:textColor="#111111"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_video"
app:layout_constraintTop_toTopOf="parent" />
<CheckBox
android:id="@+id/check_video"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginEnd="10dp"
android:button="@null"
android:drawableStart="@drawable/check"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl3"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="20dp"
android:background="@drawable/shape_which_bg"
app:layout_constraintTop_toBottomOf="@id/cl2">
<ImageView
android:id="@+id/iv_audio"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:scaleType="fitXY"
android:src="@mipmap/icon_photo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="Audio"
android:textColor="#111111"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_audio"
app:layout_constraintTop_toTopOf="parent" />
<CheckBox
android:id="@+id/check_audio"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginEnd="10dp"
android:button="@null"
android:drawableStart="@drawable/check"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl4"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="20dp"
android:background="@drawable/shape_which_bg"
app:layout_constraintTop_toBottomOf="@id/cl3">
<ImageView
android:id="@+id/iv_doc"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:scaleType="fitXY"
android:src="@mipmap/icon_photo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="Document"
android:textColor="#111111"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_doc"
app:layout_constraintTop_toTopOf="parent" />
<CheckBox
android:id="@+id/check_document"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginEnd="10dp"
android:button="@null"
android:drawableStart="@drawable/check"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/iv_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/bottom_img1"
app:layout_constraintBottom_toBottomOf="parent"/>
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/iv_bottom">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@mipmap/img_adzhanwei_small" />
</FrameLayout>
<TextView
android:id="@+id/tv_continue"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:textSize="17sp"
android:text="Continue >"
android:textColor="#1364FF"
android:gravity="center"
android:layout_marginEnd="16dp"
app:layout_constraintBottom_toTopOf="@id/fl_ad"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
This diff is collapsed.
......@@ -7,6 +7,7 @@
tools:context=".view.activity.StartActivity">
<ImageView
android:id="@+id/adad"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginTop="199dp"
......@@ -28,6 +29,50 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_ee"
android:layout_width="match_parent"
android:layout_height="165dp"
android:layout_marginHorizontal="35dp"
android:layout_marginTop="38dp"
android:layout_marginBottom="20dp"
app:layout_constraintBottom_toTopOf="@id/start_id"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/product_name">
<TextView
android:id="@+id/text_consent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Consent Required"
android:textColor="#000000"
android:textSize="13sp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/essentiona"
app:layout_constraintEnd_toStartOf="@id/text_consent"
app:layout_constraintTop_toTopOf="@id/text_consent"
app:layout_constraintBottom_toBottomOf="@id/text_consent"
android:layout_marginEnd="8dp"/>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:layout_marginHorizontal="15dp"
app:layout_constraintTop_toBottomOf="@id/text_consent"
app:layout_constraintBottom_toBottomOf="parent">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/consent_string"
android:singleLine="false"/>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/start_id"
android:layout_width="match_parent"
......
This diff is collapsed.
<?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="wrap_content"
android:layout_marginTop="18dp">
<ImageView
android:id="@+id/item_battery_img"
android:layout_width="46dp"
android:layout_height="46dp"
android:scaleType="fitXY"
android:src="@mipmap/ic_launcher"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/item_battery_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="56dp"
android:layout_marginEnd="180dp"
android:gravity="start"
android:text="1111"
android:maxLines="1"
android:ellipsize="end"
android:textColor="#000000"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/item_button_battery_delete"
android:layout_width="80dp"
android:layout_height="30dp"
android:background="@drawable/shape_button_qian_blue_radio_90"
android:gravity="center"
android:text="Stop"
android:textAllCaps="false"
android:textColor="#2E7CF6"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="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="wrap_content"
android:layout_marginBottom="29dp">
<ImageView
android:id="@+id/item_battery_img"
android:layout_width="46dp"
android:layout_height="46dp"
android:scaleType="fitXY"
android:src="@mipmap/ic_launcher"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/item_battery_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="56dp"
android:layout_marginEnd="180dp"
android:gravity="start"
android:text="1111"
android:maxLines="1"
android:ellipsize="end"
android:textColor="#000000"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/item_button_battery_delete"
android:layout_width="80dp"
android:layout_height="30dp"
android:background="@drawable/shape_button_qian_blue_radio_90"
android:gravity="center"
android:text="Unistall"
android:textAllCaps="false"
android:textColor="#666666"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/item_battery_memory_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="00MB"
android:visibility="gone"
android:textSize="14sp"
android:textColor="#666666"
android:gravity="center"
android:layout_marginEnd="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/item_button_battery_delete"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -51,4 +51,5 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/item_clean_list_file_checkout"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -63,7 +63,7 @@
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginBottom="4dp"
android:src="@mipmap/c_app"
android:src="@mipmap/h_screenshot"
tools:ignore="ContentDescription" />
<TextView
......
......@@ -61,13 +61,13 @@
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginBottom="6dp"
android:src="@mipmap/c_app"
android:src="@mipmap/h_screenshot"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="App"
android:text="screenshot"
android:textColor="#666666"
android:textSize="12sp"
tools:ignore="HardcodedText" />
......
......@@ -48,4 +48,7 @@
<string name="notification_malware_2">Your device might be at risk. Tap to scan and secure it now.</string>
<string name="notification_malware_3">Your device may have potential threats. Tap to scan and eliminate them.</string>
<string name="notification_malware_4">Your device might be at risk. Tap to run a quick scan and keep your data safe.</string>
<string name="consent_string">During the use of this APP, we need to obtain the following information:Mobile phone model, mobile phone manufacturer,Android system version,Application version number, application version name,Package name,Google Ad ID,Mobile phone local time zone,Mobile phone photo album, empty folders, apk files, temp files, log files,Audio files, video files, document file, file storage locations,Battery power, mobile phone standby time, battery temperature, battery voltage, battery technology, battery capacity, battery current, current average value of the battery,The package name, signature, code version, hash, file name, size, service name, etc. of the scanned APK file
Please rest assured that we will handle your information in strict accordance with relevant laws and regulations. All the information we collect will be used reasonably to ensure the normal operation and service improvement of the APP, and we will take all necessary measures to protect the security of your personal information. Your privacy is of utmost importance to us.</string>
</resources>
\ No newline at end of file
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