<activity>

This element declares an activity existing in an application. All activities must be declared in the app manifest in order to be seen by the Android system. <activity> is always placed within a parent <application> element. The following code snippet shows the declaration of an activity within a manifest file using the <activity> element:

<activity android:name=".GameActivity" />

The name attribute in the preceding code snippet is an attribute that specifies the name of the class that implements the activity being declared.

Get Kotlin Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.