Think of "this" as a reference (ie, pointer) variable, no different than "refForMyObject". It's just a shorthand for the reference variable that is used to reference the object you're currently "in". There are a few cases where the Java compiler special-cases its use, but still the meaning "reference variable to the current object" is consistent in all cases.
On Jul 12, 9:50 pm, Keith Roberts <keithr...@gmail.com> wrote: > Hey all, > > I know that the keyword "this" refers to an instance variable or can > invoke a constructor, but I don't understand how passing "this" as the > arg for setOnClickListener () works?Could someone explain? > > Thanks, > > keith -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en