I was reading this link to understand context in the android. I still have one question that does each activity have its own context?. Please consider i am an android learner in beginning level.
Asked
Active
Viewed 249 times
4
-
just create a constant activity variable and override it every time a new activity is created or recreated. usually done in onCreate() method – Matthew Carpenter Dec 14 '15 at 14:32
-
1Activity is context itself! – tiny sunlight Dec 14 '15 at 14:46
1 Answers
6
I still have one question that does each activity have its own context?
Each Activity
is its own Context
. Activity
is a Java class; it inherits from Context
:

CommonsWare
- 986,068
- 189
- 2,389
- 2,491