Thursday, 7 June 2018

android:onClick is not working in the layout .xml

java.lang.IllegalStateException: Could not find a method onxxxClicked(View) in the activity class android.view.ContextThemeWrapper for onClick handler on view class with id 'xxxx'

if you see above error, then, your android:onClick is not working (in the layout .xml)

solution: to fix that you need to remove the android:theme from your layout.xml (from all xml elements in this layout), e.g.

No comments:

Post a comment