Using onClick attribute in layout xml causes a NoSuchMethodException in Android dialogs

后端 未结 9 1661
说谎
说谎 2020-11-29 07:45

I have created a custom dialog and a layout xml:




        
9条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 08:11

    Try to define that method (dialogClicked) in the activity and not in the dialog.

    It might use reflection so if you use different activities just write that method in each activity that might show that dialog

提交回复
热议问题