package com.swago.user

import com.swago.baseswago.dialog.BaseXDFragment
import com.swago.baseswago.util.NoDoubleClickListener
import com.swago.user.databinding.DialogSexBinding

/**
 *@date 2021/8/28 16:25
 *description:
 */
class SexBottomDFragment : BaseXDFragment<DialogSexBinding>() {

    var callback:((sex: Int) -> Unit)? = null

    override fun initOther() {
        binding.tvMale.setOnClickListener(object : NoDoubleClickListener() {
            override fun onClick() {
                callback?.invoke(0)
                dismissAllowingStateLoss()
            }
        })

        binding.tvFemale.setOnClickListener(object : NoDoubleClickListener() {
            override fun onClick() {
                callback?.invoke(1)
                dismissAllowingStateLoss()
            }
        })
    }

    override fun initLiveData() {
    }
}