Commit 2e295ca2 authored by wanglei's avatar wanglei

=====CleanJunkActivity返回======

parent be788118
......@@ -76,7 +76,9 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
}
onBackPressedDispatcher.addCallback(object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
finishToMain()
AdmobUtils.showInterstitialAd(this@CleanJunkActivity) {
finishToMain()
}
}
})
......@@ -209,7 +211,7 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
@SuppressLint("NotifyDataSetChanged")
private fun addData(index: Int) {
if (parentList.isNotEmpty()) {
Log.e("MXL", "addData: "+index )
Log.e("MXL", "addData: " + index)
parentList[index].isfinish = true
parentList[index].parentSize = sizes[index]
mAdapter.notifyDataSetChanged()
......
......@@ -28,7 +28,7 @@ class AppFunctionAdapter(val click: (name: String) -> Unit) :
Fun(JUNK_CLEANER, R.mipmap.cleanjunk_home, "Clean junk regularly to free up space", "Clean Up"),
Fun(PHOTO_COMPRESS, R.mipmap.photo_home, "Compress photos to save space", "Compress"),
Fun(LARGE_FILE_CLEANER, R.mipmap.large_home, "Clean large files to free up storage space", "Clean Up"),
Fun(BATTERY_INFO, R.mipmap.battery, "View battery usage and details", "Check Now"),
Fun(BATTERY_INFO, R.mipmap.battery_home, "View battery usage and details", "Check Now"),
Fun(
APP_MANAGER,
R.mipmap.appmanager,
......
......@@ -49,7 +49,7 @@ class BatteryFragment : BaseFragment<FragmentBatteryBinding>() {
binding.tvGo.setOnClickListener {
requireContext().startActivity(Intent(requireContext(), BatteryInfoActivity::class.java))
}
testChart()
// testChart()
}
private inner class BatteryReceiver : BroadcastReceiver() {
......
......@@ -94,7 +94,8 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="150dp">
android:layout_height="150dp"
android:visibility="gone">
<com.github.mikephil.charting.charts.LineChart
android:id="@+id/chart"
......
......@@ -18,7 +18,7 @@
android:layout_height="42dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="9dp"
android:src="@mipmap/battery" />
android:src="@mipmap/battery_home" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
......@@ -33,7 +33,8 @@
android:text="Battery information"
android:textColor="#ff000000"
android:textSize="15sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_des"
......
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