In various bits of Android code I\'ve seen:
public class MyActivity extends Activity {
public void method() {
mContext = this; // since Activi
I've only used this and getBaseContext
when toasting from an onClick
(very green noob to both Java and android). I use this when my clicker is directly in the activity and have to use getBaseContext
in an anonymous inner clicker. I'm guessing that is pretty much the trick with getBaseContext
, it is perhaps returning the context of the activity in which the inner class is hiding.