In an Android app, is there anything wrong with the following approach:
Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Showing posts with label android-context. Show all posts
Showing posts with label android-context. Show all posts
Sunday, June 3, 2012
Using Application context everywhere?
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();
}
}
Subscribe to:
Posts (Atom)