class QuantDkMainDialog : DialogFragment()中点击回调中发送点击事件
btnBlue.setOnClickListener {
clickedBtn = true
RxBus.getDefault().post(QuantManager.TYPE_EXPIRE_CLICK, "1")
dismiss()
}
btnYellow.setOnClickListener {
clickedBtn = true
RxBus.getDefault().post(QuantManager.TYPE_EXPIRE_CLICK, "2")
dismiss()
}
在这里接受数据
override fun onResume() {
super.onResume()
RxBus.getDefault().subscribe(this, QuantManager.TYPE_EXPIRE_CLICK, RxBus.Callback<String> { s ->
if ("1" == s) {
bottomView?.leftBottom?.performClick()
} else if ("2" == s) {
bottomView?.rightBottom?.performClick()
}
})
}
升级buildToolsVersion
问题解决
performClick不能用了么? 稍后测试
网友评论