Showing posts with label android-context. Show all posts
Showing posts with label android-context. Show all posts

Sunday, June 3, 2012

Friday, June 1, 2012

Android - what"s the difference between the various methods to get a Context?


In various bits of Android code I've seen:




public class MyActivity extends Activity {
public void method() {
mContext = this; // since Activity extends Context
mContext = getApplicationContext();
mContext = getBaseContext();
}
}