package com.swago.room.dialog

import android.os.Bundle
import android.view.Gravity
import com.swago.baseswago.baseroom.SwagoRoomManager
import com.swago.baseswago.dialog.BaseXDFragment
import com.swago.baseswago.util.NoDoubleClickListener
import com.swago.room.databinding.DialogAudioNoticeUserBinding

class AudioNoticeUserDialog : BaseXDFragment<DialogAudioNoticeUserBinding>() {


    init {
        setGravity(Gravity.CENTER)
        setDimAmount(0.5f)
        setCanCancel(false)
    }

    companion object{
        fun newInstance(): AudioNoticeUserDialog {
            val args = Bundle()
            val fragment = AudioNoticeUserDialog()
            fragment.arguments = args
            return fragment
        }
    }

    override fun initOther() {
        SwagoRoomManager.iRoomInfo?.let {
            binding.tvNotice.text = it.getAudioNotice()
        }
        binding.tvSure.setOnClickListener(object: NoDoubleClickListener(){
            override fun onClick() {
               dismissAllowingStateLoss()
            }
        })
    }

    override fun initLiveData() {}
}