In the earlier Android Programming Tutorial, page 192, we see an implementation of LunchList#onOptionsItemSelected
. Within this implementation we see two Intent
s passed to startActivity
: one whose constructor is passed LunchList.this
, the other whose constructor is passed this
.
What's the difference?
See lines 78 - 91 here. Note how onOptionsItemSelected
is not declared within an inner class.
In Android/Java does the value of this
change within the context of event handlers or function binding via reflection? Could both Intent
instances be passed this
?
onOptionsItemSelected
is not declared within an inner class. – Bolduc