onClick Event for radio or checkboxes

How can I use a onClick Event (or similar) to recognize a change of check or unchecked radio or checkboxes?

You can use “onChange” event. This event is called when data in some input was changed

The “onChange” event is not working, I tried it several times. I load radio and checkbox from XML dynamically.

Nobody any idea?

Oh sorry, it was my mistake -> onChange is working, also if you use data from xml.