How to use data-binding in Dialog?

前端 未结 8 1763
傲寒
傲寒 2021-01-30 12:29

I am having trouble in implementing databinding in a Dialog. Is it possible?

Below is my xml.



    

        
8条回答
  •  不思量自难忘°
    2021-01-30 13:20

      mBinding = DataBindingUtil.inflate(LayoutInflater.from(getContext()), R.layout.dialog_select, null, false);
        setContentView(mBinding.getRoot());
        SelectDialogBean data = new SelectDialogBean();
        mBinding.setData(data);
    

提交回复
热议问题