Problem inflating custom view for AlertDialog in DialogFragment

后端 未结 9 2430
忘了有多久
忘了有多久 2020-11-27 04:43

I\'m trying to create a DialogFragment using a custom view in an AlertDialog. This view must be inflated from xml. In my DialogFragment

9条回答
  •  醉话见心
    2020-11-27 04:54

    Faced the same issue, and it took lot of time to get rid of the error. Finally passing resource ID to setView() method solved the problem. Add set view as below:

    .setView(R.layout.dialog)

提交回复
热议问题