Typo on p. 84?
Hi, All:
On p. 84, the author says that you can write onClick() in FragmentsActivity.java. The Button associated with onClick() is defined in fragment2.xml, and associated with Fragment2.java, so should onClick() be defined in Fragment2.java? Or is there some magic happening that if a UI control in a fragment can't find its handler, it consults the activity that it is embedded in?
Thanks for any info,
Michael
|