Commit 8bfefe42 authored by leichao.gao's avatar leichao.gao

Merge branch 'free-master-ad-legal' of…

Merge branch 'free-master-ad-legal' of gitlab.huolea.com:koko/easy-junk-cleaner-6-18 into free-master-ad-legal
parents 1a52ed2f 400dd0b6
......@@ -23,6 +23,7 @@ class AppManagerAnimationActivity : BaseActivity<ActivityAppManagerAnimationBind
override fun initView() {
playLottie()
AdmobUtils.showNativeAd(this, binding.flAd)
}
override fun initListener() {
......
......@@ -24,6 +24,7 @@ class BatteryInfoAnimationActivity : BaseActivity<ActivityBatteryInfoAnimationBi
override fun initView() {
playLottie()
AdmobUtils.showNativeAd(this@BatteryInfoAnimationActivity, binding.flAd)
}
override fun initListener() {
......@@ -32,7 +33,7 @@ class BatteryInfoAnimationActivity : BaseActivity<ActivityBatteryInfoAnimationBi
}
}
fun playLottie() {
private fun playLottie() {
binding.idConsOne.isVisible = true
binding.idBatteryLottie.imageAssetsFolder = "battery_scan/images/"
binding.idBatteryLottie.setAnimation("battery_scan/data.json")
......
......@@ -47,6 +47,7 @@ import com.test.easy.easycleanerjunk.helps.PermissionHelp.requestStorePermission
import com.test.easy.easycleanerjunk.helps.TimeUtils
import com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import com.test.easy.easycleanerjunk.view.AFunOb
import com.test.easy.easycleanerjunk.view.DialogViews.showDialogFunctionExit
import com.test.easy.easycleanerjunk.view.DialogViews.showGerPermission
import com.test.easy.easycleanerjunk.view.FileDeleteDialog.showFileDeleteDialog
import com.test.easy.easycleanerjunk.view.FileDetailDialog.showFileDetailDialog
......@@ -188,10 +189,11 @@ class LargeFileCleanActivity : BaseActivity<ActivityLayoutLargeFileBinding>() {
onBackPressedDispatcher.onBackPressed()
}
onBackPressedDispatcher.addCallback {
startActivity(Intent(this@LargeFileCleanActivity, FunctionGuideActivity::class.java).apply {
putExtra("from", AFunOb.LARGE_FILE_CLEANER)
})
finish()
showDialogFunctionExit(AFunOb.LARGE_FILE_CLEANER) {
AdmobUtils.showInterstitialAd(this@LargeFileCleanActivity) {
finishToMain()
}
}
}
}
......@@ -251,7 +253,6 @@ class LargeFileCleanActivity : BaseActivity<ActivityLayoutLargeFileBinding>() {
}
@SuppressLint("SetTextI18n")
private fun showPopupWindow(view: View, type: Int = 0, list: List<Filter>) {
val popupWindowView = layoutInflater.inflate(R.layout.popupwindow_file_filter, null)
......
......@@ -6,6 +6,7 @@ import android.content.Context
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.view.LayoutInflater
import android.widget.ImageView
import android.widget.TextView
import com.test.easy.easycleanerjunk.R
import com.test.easy.easycleanerjunk.activity.photocompress.photo.CustomDialog
......@@ -96,6 +97,7 @@ object DialogViews {
dialog.show()
}
@SuppressLint("SetTextI18n")
fun Context.showDialogFunctionExit(function: String, okAction: () -> Unit) {
val desc = when (function) {
JUNK_CLEANER -> "Exit Junk Cleaner? Unremoved junk files may be taking up space."
......@@ -111,8 +113,11 @@ object DialogViews {
val dialog = CustomDialog(this, R.layout.dialog_function_exit)
dialog.findViewById<ImageView>(R.id.iv_close).setOnClickListener {
dialog.dismiss()
}
dialog.findViewById<TextView>(R.id.tv_tittle).text = function
dialog.findViewById<TextView>(R.id.tv_desc).text = desc
dialog.findViewById<TextView>(R.id.tv_desc).text = "Exit $desc?"
dialog.findViewById<TextView>(R.id.tv_cancel).setOnClickListener {
dialog.dismiss()
}
......
......@@ -35,4 +35,10 @@
</FrameLayout>
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -35,4 +35,10 @@
</FrameLayout>
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
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