I have a problem with my Dialog Fragment. I wanted to use android:onClick attribute as in my opinion code is more clear then.
In my layout I have the following declarati
I don't think that is related to the support fragment.
The issue seems to arise from the fact that you are registering a onClick on XML that fires up based on the activity that the fragment was binded at the time of the click.
As your "buttonCancel" method does not exists in the activity (because it is inside the fragment), it fails.
I don't think that really is a desirable solution, but you can register your "buttonCancel" method on your activity for that error to go away, and make that "buttonCancel" method registered on the activity only call the method that exists in the fragment, in case you want to keep your action / view behaviour inside the fragment.