About
reference/android/content/Context.html: Interface to global information about an application environment.
An activity is a subclass of context and is therefore a context.
Articles Related
Example
- displaying different kind of data
- of switching from viewing to entering data
Configuration
Layout file
In a layout file, see the tools:context attribute.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".MainActivity">
....
</RelativeLayout>