In an activity I can set android:onClick in the XML file to the name of a method in my in my Activity object. I want to read a table in my sqlite database, create buttons, and set the onClick to point to a method in my Activity just like I can if I add static views in my XML file.
Can I do this instead of having to create View.OnClickListener() objects. I find the XML approach much easier to read in my Java code. If this is not possible, how does the XML do it?