Commit fc679e59 authored by wanglei's avatar wanglei

...

parent c09a9fbe
......@@ -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()
}
......
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