package com.base.appzxhy.ui.views

import android.app.AlertDialog
import android.content.Context
import android.view.Gravity
import android.view.LayoutInflater
import com.base.appzxhy.databinding.DialogPlaySpeedBinding

object ShortPlaySpeedDialog {

    fun Context.showShortPlaySpeedDialog() {
        val dialog = AlertDialog.Builder(this).create()
        val binding = DialogPlaySpeedBinding.inflate(LayoutInflater.from(this))
        dialog.setView(binding.root)
        dialog.setCanceledOnTouchOutside(false)

        dialog.show()

        val params = dialog.window?.attributes
//        params?.width = resources.getDimensionPixelOffset(R.dimen.dp_320)
//        params?.height = resources.getDimensionPixelOffset(R.dimen.dp_400)
        params?.gravity = Gravity.CENTER
//        params?.y = 50

    }
}