package com.base.browserwhite.ads

import android.app.AlertDialog
import android.content.Context
import android.view.LayoutInflater
import com.base.browserwhite.R
import com.base.browserwhite.databinding.DialogDeleteTipBinding

object AdDialog {
    fun Context.showAdPreparingDialog() {
        val binding = DialogDeleteTipBinding.inflate(LayoutInflater.from(this))
        val dialog = AlertDialog.Builder(this).create()
        dialog.setView(binding.root)

        dialog.show()
        val params = dialog.window?.attributes
        params?.width = resources.getDimensionPixelOffset(R.dimen.dp_335)
        dialog.window?.attributes = params
        dialog.window?.setBackgroundDrawableResource(android.R.color.transparent)
    }
}