Commit a4b70cc6 authored by wanglei's avatar wanglei

==================对齐5.16号主包版本和bug修复====================

parent d09b150f
...@@ -8,10 +8,6 @@ plugins { ...@@ -8,10 +8,6 @@ plugins {
// id 'com.google.gms.google-services' // id 'com.google.gms.google-services'
} }
//applovin {
// apiKey "7M6t_fBDFPKdlDdekL1bw1OntM7gd4Vk5yK_p7yEdl9BCKCfGZpmZMvL2LDHcuNGWIHLXPD0w_SFDDv94WMaSw"
//}
android { android {
namespace 'com.zxhyis.toolss' namespace 'com.zxhyis.toolss'
compileSdk 34 compileSdk 34
...@@ -96,19 +92,8 @@ dependencies { ...@@ -96,19 +92,8 @@ dependencies {
implementation 'com.belerweb:pinyin4j:2.5.1' implementation 'com.belerweb:pinyin4j:2.5.1'
implementation files('libs/trustlook_cleanjunk_sdk_release_3.0.4.20240322.aar') implementation files('libs/trustlook_cleanjunk_sdk_release_3.0.4.20240322.aar')
//广告
// implementation("com.applovin:applovin-sdk:+")
// implementation 'com.applovin:applovin-sdk:12.4.2'
// implementation 'com.applovin.mediation:google-adapter:23.0.0.0'
// implementation 'com.applovin.mediation:ironsource-adapter:8.0.0.0.0'
// implementation 'com.applovin.mediation:vungle-adapter:7.3.1.2'
// implementation 'com.applovin.mediation:facebook-adapter:6.17.0.0'
// implementation 'com.applovin.mediation:mintegral-adapter:16.7.21.0'
// implementation 'com.applovin.mediation:bytedance-adapter:5.9.0.2.0'
// implementation 'com.applovin.mediation:fyber-adapter:8.2.7.1'
// implementation 'com.applovin.mediation:unityads-adapter:4.10.0.0'
// implementation 'com.applovin.mediation:yandex-adapter:6.4.1.0'
//广告
implementation 'com.google.firebase:firebase-analytics:21.6.2' implementation 'com.google.firebase:firebase-analytics:21.6.2'
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1' implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation 'com.google.android.gms:play-services-appset:16.0.2' implementation 'com.google.android.gms:play-services-appset:16.0.2'
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
android:name="android.hardware.camera" android:name="android.hardware.camera"
android:required="false" /> <!-- 网络权限 --> android:required="false" /> <!-- 网络权限 -->
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission <uses-permission
android:name="android.permission.MANAGE_EXTERNAL_STORAGE" android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" /> tools:ignore="ScopedStorage" />
...@@ -64,6 +65,7 @@ ...@@ -64,6 +65,7 @@
android:exported="true" android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/splashtheme"
tools:ignore="DiscouragedApi,LockedOrientationActivity"> tools:ignore="DiscouragedApi,LockedOrientationActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
......
...@@ -24,10 +24,10 @@ import com.zxhyis.toolss.ui.start.FlashlightService ...@@ -24,10 +24,10 @@ import com.zxhyis.toolss.ui.start.FlashlightService
object OpenNotificationsUtil { object OpenNotificationsUtil {
const val OPEN_APP_NOTIFICATION = 200 const val OPEN_APP_NOTIFICATION = 213
const val OPEN_LISTENER_SETTINGS = 201 const val OPEN_LISTENER_SETTINGS = 251
const val OPEN_SERVICE_NOTIFICATION_ID = 1 const val OPEN_SERVICE_NOTIFICATION_ID = 67
const val OPEN_MESSAGE_NOTIFICATION_ID = 2 const val OPEN_MESSAGE_NOTIFICATION_ID = 8
/** /**
* 是否开启APP通知 * 是否开启APP通知
...@@ -121,6 +121,7 @@ object OpenNotificationsUtil { ...@@ -121,6 +121,7 @@ object OpenNotificationsUtil {
context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
val contentView = RemoteViews(context.packageName, R.layout.reminder_layout_notification) val contentView = RemoteViews(context.packageName, R.layout.reminder_layout_notification)
val expendView = RemoteViews(context.packageName, R.layout.reminder_layout_notification_big) val expendView = RemoteViews(context.packageName, R.layout.reminder_layout_notification_big)
val intent0 = Intent(context, PrepareScanActivity::class.java) val intent0 = Intent(context, PrepareScanActivity::class.java)
val pendingIntent0 = val pendingIntent0 =
PendingIntent.getActivity(context, 0, intent0, PendingIntent.FLAG_IMMUTABLE) PendingIntent.getActivity(context, 0, intent0, PendingIntent.FLAG_IMMUTABLE)
...@@ -135,14 +136,15 @@ object OpenNotificationsUtil { ...@@ -135,14 +136,15 @@ object OpenNotificationsUtil {
val pendingIntent2 = val pendingIntent2 =
PendingIntent.getActivity(context, 0, intent2, PendingIntent.FLAG_IMMUTABLE) PendingIntent.getActivity(context, 0, intent2, PendingIntent.FLAG_IMMUTABLE)
contentView.setOnClickPendingIntent(R.id.id_battery, pendingIntent2) contentView.setOnClickPendingIntent(R.id.id_battery, pendingIntent2)
val serviceComponet = ComponentName(context, FlashlightService::class.java)
val intent3 = Intent() val intent3 = Intent()
intent3.component = serviceComponet val serviceComponent = ComponentName(context, FlashlightService::class.java)
intent3.component = serviceComponent
val pendingIntent3 = val pendingIntent3 =
PendingIntent.getService(context, 0, intent3, PendingIntent.FLAG_IMMUTABLE) PendingIntent.getService(context, 0, intent3, PendingIntent.FLAG_IMMUTABLE)
contentView.setOnClickPendingIntent(R.id.id_lighit, pendingIntent3) contentView.setOnClickPendingIntent(R.id.id_lighit, pendingIntent3)
expendView.setOnClickPendingIntent(R.id.id_lighit, pendingIntent3) expendView.setOnClickPendingIntent(R.id.id_lighit, pendingIntent3)
val intent4 = Intent(context, AppManager2Activity::class.java) val intent4 = Intent(context, AppManager2Activity::class.java)
val pendingIntent4 = val pendingIntent4 =
PendingIntent.getActivity(context, 0, intent4, PendingIntent.FLAG_IMMUTABLE) PendingIntent.getActivity(context, 0, intent4, PendingIntent.FLAG_IMMUTABLE)
......
...@@ -11,8 +11,10 @@ import android.net.Uri ...@@ -11,8 +11,10 @@ import android.net.Uri
import android.os.Build import android.os.Build
import androidx.activity.OnBackPressedCallback import androidx.activity.OnBackPressedCallback
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import androidx.viewpager2.adapter.FragmentStateAdapter import androidx.viewpager2.adapter.FragmentStateAdapter
import androidx.viewpager2.widget.ViewPager2 import androidx.viewpager2.widget.ViewPager2
import com.blankj.utilcode.util.AppUtils
import com.blankj.utilcode.util.BarUtils import com.blankj.utilcode.util.BarUtils
import com.zxhyis.toolss.R import com.zxhyis.toolss.R
import com.zxhyis.toolss.base.TopActivity import com.zxhyis.toolss.base.TopActivity
...@@ -21,6 +23,9 @@ import com.zxhyis.toolss.ui.dialog.ExitDialog ...@@ -21,6 +23,9 @@ import com.zxhyis.toolss.ui.dialog.ExitDialog
import com.zxhyis.toolss.ui.dialog.RateStarPop import com.zxhyis.toolss.ui.dialog.RateStarPop
import com.zxhyis.toolss.ui.page.PopExitWindow import com.zxhyis.toolss.ui.page.PopExitWindow
import com.zxhyis.toolss.ui.page.notifaction.HistoryDatabase import com.zxhyis.toolss.ui.page.notifaction.HistoryDatabase
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
class MainActivity : TopActivity<ActivityMainBinding>() { class MainActivity : TopActivity<ActivityMainBinding>() {
...@@ -42,8 +47,12 @@ class MainActivity : TopActivity<ActivityMainBinding>() { ...@@ -42,8 +47,12 @@ class MainActivity : TopActivity<ActivityMainBinding>() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
RateStarPop.show(this) if (AppUtils.isAppForeground()) {
lifecycleScope.launch(Dispatchers.Main) {
delay(1000)
RateStarPop.show(this@MainActivity)
}
}
} }
private fun createShortcut() { private fun createShortcut() {
......
package com.zxhyis.toolss.ui.page package com.zxhyis.toolss.ui.page
import android.animation.Animator
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.bluetooth.BluetoothAdapter import android.bluetooth.BluetoothAdapter
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
...@@ -13,16 +14,12 @@ import android.location.LocationManager ...@@ -13,16 +14,12 @@ import android.location.LocationManager
import android.net.wifi.WifiConfiguration import android.net.wifi.WifiConfiguration
import android.net.wifi.WifiManager import android.net.wifi.WifiManager
import android.os.BatteryManager import android.os.BatteryManager
import android.os.Handler
import android.os.Looper
import android.os.Message
import android.os.SystemClock import android.os.SystemClock
import android.provider.Settings import android.provider.Settings
import android.view.View import android.view.View
import androidx.activity.OnBackPressedCallback import androidx.activity.OnBackPressedCallback
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.lifecycle.lifecycleScope import androidx.core.view.isVisible
import com.bumptech.glide.Glide
import com.zxhyis.toolss.R import com.zxhyis.toolss.R
import com.zxhyis.toolss.ad.AdmobUtils import com.zxhyis.toolss.ad.AdmobUtils
import com.zxhyis.toolss.base.TopActivity import com.zxhyis.toolss.base.TopActivity
...@@ -33,12 +30,9 @@ import com.zxhyis.toolss.logic.startActivity ...@@ -33,12 +30,9 @@ import com.zxhyis.toolss.logic.startActivity
import com.zxhyis.toolss.logic.testLog import com.zxhyis.toolss.logic.testLog
import com.zxhyis.toolss.ui.AFunOb import com.zxhyis.toolss.ui.AFunOb
import com.zxhyis.toolss.ui.page.result.ResultActivity import com.zxhyis.toolss.ui.page.result.ResultActivity
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import java.util.Calendar import java.util.Calendar
import java.util.Date import java.util.Date
import java.util.Timer import java.util.Timer
import java.util.TimerTask
import kotlin.math.roundToInt import kotlin.math.roundToInt
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
...@@ -46,30 +40,31 @@ class BatteryInfoActivity : TopActivity<ActivityBatteryInfoBinding>() { ...@@ -46,30 +40,31 @@ class BatteryInfoActivity : TopActivity<ActivityBatteryInfoBinding>() {
private lateinit var receiver: BatteryReceiver private lateinit var receiver: BatteryReceiver
private var isNeedRefresh = true private var isNeedRefresh = true
private val handler = object : Handler(Looper.getMainLooper()) {
// private val handler = object : Handler(Looper.getMainLooper()) {
override fun handleMessage(msg: Message) { //
super.handleMessage(msg) // override fun handleMessage(msg: Message) {
when (msg.what) { // super.handleMessage(msg)
1 -> { // when (msg.what) {
if (i < 100) { // 1 -> {
i += 2 // if (i < 100) {
vb.tvProgress.text = "$i%" // i += 2
} else { // vb.tvProgress.text = "$i%"
i = 100 // } else {
vb.tvProgress.text = "$i%" // i = 100
timer.cancel() // vb.tvProgress.text = "$i%"
lifecycleScope.launch { // timer.cancel()
delay(500) // lifecycleScope.launch {
AdmobUtils.showInterstitialAd(this@BatteryInfoActivity) // delay(500)
// MaxAdUtils.showMaxInterstitialAd(this@BatteryInfoActivity,"interstitial_slot") // AdmobUtils.showInterstitialAd(this@BatteryInfoActivity)
updateUI() // // MaxAdUtils.showMaxInterstitialAd(this@BatteryInfoActivity,"interstitial_slot")
} // updateUI()
} // }
} // }
} // }
} // }
} // }
// }
private lateinit var cm: CameraManager private lateinit var cm: CameraManager
private lateinit var cameraId: String private lateinit var cameraId: String
private var isTorchOn = false private var isTorchOn = false
...@@ -140,6 +135,12 @@ class BatteryInfoActivity : TopActivity<ActivityBatteryInfoBinding>() { ...@@ -140,6 +135,12 @@ class BatteryInfoActivity : TopActivity<ActivityBatteryInfoBinding>() {
} }
setFilter() setFilter()
vb.idBatteryLottie.imageAssetsFolder = "battery_info/images/"
vb.idBatteryLottie.setAnimation("battery_info/data.json")
vb.idBatteryLottie.playAnimation()
vb.root.postDelayed({
playFinish()
}, 5000)
vb.inPower.tvTitle.text = "Battery information" vb.inPower.tvTitle.text = "Battery information"
vb.inPower.tvMenu.visibility = View.GONE vb.inPower.tvMenu.visibility = View.GONE
vb.inPower.ivBack.setOnClick(javaClass.simpleName) { vb.inPower.ivBack.setOnClick(javaClass.simpleName) {
...@@ -147,7 +148,10 @@ class BatteryInfoActivity : TopActivity<ActivityBatteryInfoBinding>() { ...@@ -147,7 +148,10 @@ class BatteryInfoActivity : TopActivity<ActivityBatteryInfoBinding>() {
} }
onBackPressedDispatcher.addCallback(object : OnBackPressedCallback(true) { onBackPressedDispatcher.addCallback(object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() { override fun handleOnBackPressed() {
finishToMain() AdmobUtils.showInterstitialAd(this@BatteryInfoActivity) {
finishToMain()
}
} }
}) })
...@@ -181,17 +185,43 @@ class BatteryInfoActivity : TopActivity<ActivityBatteryInfoBinding>() { ...@@ -181,17 +185,43 @@ class BatteryInfoActivity : TopActivity<ActivityBatteryInfoBinding>() {
finish() finish()
} }
setTimer() // setTimer()
Glide.with(this) // Glide.with(this)
.asGif() // .asGif()
.load(R.drawable.power_load) // .load(R.drawable.power_load)
.into(vb.ivLoad) // .into(vb.ivLoad)
} }
private fun playFinish() {
vb.idConsOne.isVisible = false
vb.idConsBatteryFinish.isVisible = true
vb.idBatteryFinish.addAnimatorListener(object : Animator.AnimatorListener {
override fun onAnimationStart(p0: Animator) {
}
override fun onAnimationEnd(p0: Animator) {
AdmobUtils.showInterstitialAd(this@BatteryInfoActivity) {
updateUI()
}
}
override fun onAnimationCancel(p0: Animator) {
}
override fun onAnimationRepeat(p0: Animator) {
}
})
}
private fun checkFlashLight() { private fun checkFlashLight() {
cm.registerTorchCallback(object : CameraManager.TorchCallback() { cm.registerTorchCallback(object : CameraManager.TorchCallback() {
override fun onTorchModeChanged(cameraId: String, enabled: Boolean) { override fun onTorchModeChanged(cameraId: String, enabled: Boolean) {
...@@ -227,7 +257,7 @@ class BatteryInfoActivity : TopActivity<ActivityBatteryInfoBinding>() { ...@@ -227,7 +257,7 @@ class BatteryInfoActivity : TopActivity<ActivityBatteryInfoBinding>() {
} }
private fun checkBluetooth() { private fun checkBluetooth() {
// vb.switchTwo.isChecked = bluetoothAdapter?.isEnabled == true // vb.switchTwo.isChecked = bluetoothAdapter?.isEnabled == true
} }
private fun turnOnBluetooth() { private fun turnOnBluetooth() {
...@@ -343,27 +373,29 @@ class BatteryInfoActivity : TopActivity<ActivityBatteryInfoBinding>() { ...@@ -343,27 +373,29 @@ class BatteryInfoActivity : TopActivity<ActivityBatteryInfoBinding>() {
private fun updateUI() { private fun updateUI() {
vb.apply { vb.apply {
ivLoad.visibility = View.GONE // ivLoad.visibility = View.GONE
tvProgress.visibility = View.GONE // tvProgress.visibility = View.GONE
idBatteryLottie.visibility = View.GONE
idConsBatteryFinish.isVisible = false
nsv.visibility = View.VISIBLE nsv.visibility = View.VISIBLE
btOk.visibility = View.VISIBLE btOk.visibility = View.VISIBLE
inPower.clInclude.visibility = View.VISIBLE inPower.clInclude.visibility = View.VISIBLE
} }
} }
private fun setTimer() { // private fun setTimer() {
timer.schedule( // timer.schedule(
object : TimerTask() { // object : TimerTask() {
override fun run() { // override fun run() {
val message = Message() // val message = Message()
message.what = 1 // message.what = 1
handler.sendMessage(message) // handler.sendMessage(message)
} // }
}, // },
500, // 500,
80 // 80
) // )
} // }
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
......
...@@ -30,7 +30,11 @@ class SpeakCleaningActivity : TopActivity<ActivityLayoutSpeakerCleaningBinding>( ...@@ -30,7 +30,11 @@ class SpeakCleaningActivity : TopActivity<ActivityLayoutSpeakerCleaningBinding>(
} }
override fun onStop() { override fun onStop() {
super.onStop() super.onStop()
zAudio.pause() try {
zAudio.pause()
} catch (e: Exception) {
zAudio.stop()
}
} }
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
......
...@@ -52,7 +52,9 @@ class VirusActivity : TopActivity<ActivityLayoutVirusBinding>() { ...@@ -52,7 +52,9 @@ class VirusActivity : TopActivity<ActivityLayoutVirusBinding>() {
} }
onBackPressedDispatcher.addCallback(object : OnBackPressedCallback(true) { onBackPressedDispatcher.addCallback(object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() { override fun handleOnBackPressed() {
finishToMain() AdmobUtils.showInterstitialAd(this@VirusActivity){
finishToMain()
}
} }
}) })
......
...@@ -27,24 +27,32 @@ import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombi ...@@ -27,24 +27,32 @@ import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombi
/** /**
*/ */
class AppListFragment( class AppListFragment() : Fragment(), ReportInterface {
val launcher: ActivityLauncher,
val type: Int = 0,
isAsc: Boolean = true,
val needPermission: Boolean = false
) : Fragment(), ReportInterface {
private val TAG = "AppListFragment" private val TAG = "AppListFragment"
private lateinit var binding: FragmentAppListBinding private lateinit var binding: FragmentAppListBinding
private var adapter: AppListAdapter? = null private var adapter: AppListAdapter? = null
private var list = arrayListOf<AppBean>() private var list = arrayListOf<AppBean>()
var isAsc: Boolean = true
private var isRefreshData = false//是否需要更新数据 private var isRefreshData = false//是否需要更新数据
init { private lateinit var launcher: ActivityLauncher
private var type: Int = 0
var isAsc: Boolean = true
private var needPermission: Boolean = false
fun setInitData(
launcher: ActivityLauncher,
type: Int = 0,
isAsc: Boolean = true,
needPermission: Boolean = false
) {
this.launcher = launcher
this.type = type
this.isAsc = isAsc this.isAsc = isAsc
this.needPermission = needPermission
} }
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
} }
...@@ -130,11 +138,10 @@ class AppListFragment( ...@@ -130,11 +138,10 @@ class AppListFragment(
* 刷洗fragment数据 * 刷洗fragment数据
*/ */
@SuppressLint("NotifyDataSetChanged") @SuppressLint("NotifyDataSetChanged")
fun refreshFragmentData(dataList: List<AppBean>, isRefresh: Boolean = false) { fun refreshFragmentData(dataList: List<AppBean>, isRefresh: Boolean = false, index: Int = 0) {
isRefreshData = true isRefreshData = true
LogEx.logDebug(TAG, "isRefresh=$isRefresh isVisible=$isVisible index=$index")
if (isRefresh && isVisible) { if (isRefresh && isVisible) {
LogEx.logDebug(TAG, "isRefresh=$isRefresh")
binding.flPermission.visibility = View.GONE binding.flPermission.visibility = View.GONE
binding.progressbar.visibility = View.GONE binding.progressbar.visibility = View.GONE
setDataRefresh(dataList) setDataRefresh(dataList)
......
...@@ -92,7 +92,7 @@ class AppManager2Activity : AppCompatActivity(), ReportInterface { ...@@ -92,7 +92,7 @@ class AppManager2Activity : AppCompatActivity(), ReportInterface {
pages.forEachIndexed { index, fragment -> pages.forEachIndexed { index, fragment ->
val appListFragment = (fragment as AppListFragment) val appListFragment = (fragment as AppListFragment)
appListFragment.refreshFragmentData(dataList, index == currentPosition) appListFragment.refreshFragmentData(dataList, index == currentPosition, index)
} }
} }
...@@ -155,7 +155,7 @@ class AppManager2Activity : AppCompatActivity(), ReportInterface { ...@@ -155,7 +155,7 @@ class AppManager2Activity : AppCompatActivity(), ReportInterface {
} }
private fun playlottie() { private fun playlottie() {
LogEx.logDebug(TAG,"playlottie") LogEx.logDebug(TAG, "playlottie")
binding.llLottie.isVisible = true binding.llLottie.isVisible = true
binding.lottie.imageAssetsFolder = "appmanager/images/" binding.lottie.imageAssetsFolder = "appmanager/images/"
binding.lottie.setAnimation("appmanager/data.json") binding.lottie.setAnimation("appmanager/data.json")
...@@ -164,7 +164,7 @@ class AppManager2Activity : AppCompatActivity(), ReportInterface { ...@@ -164,7 +164,7 @@ class AppManager2Activity : AppCompatActivity(), ReportInterface {
AdmobUtils.showInterstitialAd(this) { AdmobUtils.showInterstitialAd(this) {
binding.llLottie.isVisible = false binding.llLottie.isVisible = false
} }
},6000) }, 6000)
} }
fun refreshUsageAccessData() { fun refreshUsageAccessData() {
...@@ -260,10 +260,11 @@ class AppManager2Activity : AppCompatActivity(), ReportInterface { ...@@ -260,10 +260,11 @@ class AppManager2Activity : AppCompatActivity(), ReportInterface {
} }
private fun initViewPager() { private fun initViewPager() {
pages.add(AppListFragment(launcher, APP_LIST_TYPE_NAME, true)) pages.add(AppListFragment().apply { setInitData(launcher, APP_LIST_TYPE_NAME, true) })
pages.add(AppListFragment(launcher, APP_LIST_TYPE_INSTALL, false)) pages.add(AppListFragment().apply { setInitData(launcher, APP_LIST_TYPE_INSTALL, false) })
pages.add(AppListFragment(launcher, APP_LIST_TYPE_SIZE, false, needPermission = true)) pages.add(AppListFragment().apply { setInitData(launcher, APP_LIST_TYPE_SIZE, false, needPermission = true) })
pages.add(AppListFragment(launcher, APP_LIST_TYPE_LAST_USE, false, needPermission = true)) pages.add(AppListFragment().apply { setInitData(launcher, APP_LIST_TYPE_LAST_USE, false, needPermission = true) })
pagerAdapter = ScreenSlidePagerAdapter(this@AppManager2Activity) pagerAdapter = ScreenSlidePagerAdapter(this@AppManager2Activity)
......
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/splash_bg" />
<item>
<bitmap
android:gravity="center"
android:src="@drawable/logo_yuan" />
</item>
</layer-list>
\ No newline at end of file
...@@ -4,32 +4,97 @@ ...@@ -4,32 +4,97 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#fff"
tools:context=".ui.page.BatteryInfoActivity"> tools:context=".ui.page.BatteryInfoActivity">
<androidx.appcompat.widget.AppCompatImageView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/iv_load" android:id="@+id/id_cons_one"
android:layout_width="170dp" android:layout_width="match_parent"
android:layout_height="180dp" android:layout_height="match_parent"
android:src="@drawable/power_load" android:background="#0ec897">
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent" <com.airbnb.lottie.LottieAnimationView
app:layout_constraintEnd_toEndOf="parent" android:id="@+id/id_battery_lottie"
app:layout_constraintStart_toStartOf="parent" android:layout_width="match_parent"
app:layout_constraintTop_toTopOf="parent" android:layout_height="wrap_content"
app:layout_constraintVertical_bias="0.3" /> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
<androidx.appcompat.widget.AppCompatTextView app:layout_constraintStart_toStartOf="parent"
android:id="@+id/tv_progress" app:layout_constraintTop_toTopOf="parent"
android:layout_width="wrap_content" app:lottie_autoPlay="true"
android:layout_height="wrap_content" app:lottie_loop="true" />
android:text="" <TextView
android:textColor="#ff999999" android:id="@+id/id_scaning"
android:textSize="19sp" android:layout_width="wrap_content"
android:visibility="visible" android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginBottom="19dp"
app:layout_constraintStart_toStartOf="parent" android:text="Analyzing battery status"
app:layout_constraintTop_toBottomOf="@+id/iv_load" /> android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/id_scan"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/id_scan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:layout_marginBottom="140dp"
android:gravity="center"
app:layout_constraintBottom_toBottomOf="parent">
<com.noober.background.view.BLView
android:layout_width="4dp"
android:layout_height="4dp"
app:bl_shape="oval"
app:bl_solid_color="@color/white" />
<com.noober.background.view.BLView
android:layout_width="4dp"
android:layout_height="4dp"
android:layout_marginHorizontal="2dp"
app:bl_shape="oval"
app:bl_solid_color="@color/white" />
<com.noober.background.view.BLView
android:layout_width="4dp"
android:layout_height="4dp"
app:bl_shape="oval"
app:bl_solid_color="@color/white" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/id_cons_battery_finish"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#0ec897"
android:visibility="gone">
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/id_battery_finish"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:lottie_autoPlay="true"
app:lottie_rawRes="@raw/finish" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="296dp"
android:text="Optimization completed"
android:textColor="@color/white"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<include <include
...@@ -43,6 +108,7 @@ ...@@ -43,6 +108,7 @@
android:layout_height="0dp" android:layout_height="0dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:visibility="gone" android:visibility="gone"
android:background="@color/white"
app:layout_constraintBottom_toTopOf="@+id/bt_ok" app:layout_constraintBottom_toTopOf="@+id/bt_ok"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
...@@ -310,8 +376,8 @@ ...@@ -310,8 +376,8 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:visibility="gone" android:layout_height="80dp"
android:layout_height="80dp"> android:visibility="gone">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_blue" android:id="@+id/iv_blue"
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:text="@string/file_manager_select" android:text="@string/clean_master"
android:textSize="15sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.noober.background.view.BLLinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <com.noober.background.view.BLLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
...@@ -14,27 +15,30 @@ ...@@ -14,27 +15,30 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_margin="24dp" android:layout_margin="24dp"
android:adjustViewBounds="true" android:adjustViewBounds="true" />
android:src="@drawable/qietu1" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp" android:layout_marginHorizontal="24dp"
android:text="Find File Manager Select,And ensure that it has been turned on. (If not found, please swipe the page)" android:text="Find Clean Master,And ensure that it has been turned on. (If not found, please swipe the page)"
android:textColor="#000000"
android:textSize="15sp" android:textSize="15sp"
android:textColor="#000000"/> tools:ignore="HardcodedText" />
<com.noober.background.view.BLTextView <com.noober.background.view.BLTextView
android:id="@+id/id_allow" android:id="@+id/id_allow"
android:layout_width="100dp" android:layout_width="100dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_gravity="end" android:layout_gravity="end"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="18dp" android:layout_marginBottom="18dp"
android:gravity="center" android:gravity="center"
android:text="Allow" android:text="Allow"
android:layout_marginEnd="24dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="15sp" android:textSize="15sp"
app:bl_corners_radius="20dp" app:bl_corners_radius="20dp"
app:bl_solid_color="#6A30F2" /> app:bl_solid_color="#6A30F2"
tools:ignore="HardcodedText" />
</com.noober.background.view.BLLinearLayout> </com.noober.background.view.BLLinearLayout>
\ No newline at end of file
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="15sp" android:textSize="15sp" />
tools:text="File Manager Select" />
<TextView <TextView
android:id="@+id/tv_number" android:id="@+id/tv_number"
......
...@@ -36,8 +36,7 @@ ...@@ -36,8 +36,7 @@
android:paddingEnd="5dp" android:paddingEnd="5dp"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="15sp" android:textSize="15sp"
tools:ignore="RtlSymmetry" tools:ignore="RtlSymmetry" />
tools:text="File Manager Select" />
<TextView <TextView
android:id="@+id/tv_time" android:id="@+id/tv_time"
...@@ -65,7 +64,6 @@ ...@@ -65,7 +64,6 @@
</LinearLayout> </LinearLayout>
<TextView <TextView
android:textStyle="bold"
android:id="@+id/tv_manage" android:id="@+id/tv_manage"
android:layout_width="58dp" android:layout_width="58dp"
android:layout_height="23dp" android:layout_height="23dp"
...@@ -75,6 +73,7 @@ ...@@ -75,6 +73,7 @@
android:gravity="center" android:gravity="center"
android:text="@string/manage" android:text="@string/manage"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="12sp" /> android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginHorizontal="5dp" android:layout_marginHorizontal="5dp"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/file_manager_select" android:text="@string/clean_master"
android:textColor="#4F565E" /> android:textColor="#4F565E" />
<FrameLayout <FrameLayout
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#b3000000" android:background="#b3000000"
...@@ -34,10 +35,11 @@ ...@@ -34,10 +35,11 @@
android:layout_marginHorizontal="20dp" android:layout_marginHorizontal="20dp"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:gravity="center" android:gravity="center"
android:text="Thank you for using File Manager Select!" android:text="Thank you for using Clean Master !"
android:textColor="#000000" android:textColor="#000000"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -48,7 +50,8 @@ ...@@ -48,7 +50,8 @@
android:gravity="center" android:gravity="center"
android:text="Thank you very much for taking the time to rate us." android:text="Thank you very much for taking the time to rate us."
android:textColor="#999999" android:textColor="#999999"
android:textSize="14sp" /> android:textSize="14sp"
tools:ignore="HardcodedText" />
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
<string name="google_play">Google Play</string> <string name="google_play">Google Play</string>
<string name="delete">DELETE</string> <string name="delete">DELETE</string>
<string name="cancel">CANCEL</string> <string name="cancel">CANCEL</string>
<string name="file_manager_select">File Manager Select</string> <string name="clean_master">Clean Master</string>
<string name="cancel_lower">cancel</string> <string name="cancel_lower">cancel</string>
<string name="clean_up_remaining_junk_files">Clean up remaining junk files</string> <string name="clean_up_remaining_junk_files">Clean up remaining junk files</string>
......
...@@ -90,10 +90,15 @@ ...@@ -90,10 +90,15 @@
<!-- Apply padding to avoid the content of the widget colliding with the rounded corners --> <!-- Apply padding to avoid the content of the widget colliding with the rounded corners -->
<item name="appWidgetPadding">16dp</item> <item name="appWidgetPadding">16dp</item>
</style> </style>
<style name="ProgressBarStyle"> <style name="ProgressBarStyle">
<item name="android:indeterminateOnly">false</item> <item name="android:indeterminateOnly">false</item>
<item name="android:indeterminateBehavior">repeat</item> <item name="android:indeterminateBehavior">repeat</item>
<item name="android:indeterminateDrawable">@android:drawable/progress_indeterminate_horizontal</item> <item name="android:indeterminateDrawable">@android:drawable/progress_indeterminate_horizontal</item>
</style> </style>
<style name="splashtheme" parent="Theme.FileManagerSelect">
<item name="android:windowBackground">@drawable/splsh_bp</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources> </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