Translations:Android Training/Starting Another Activity/6/en: Unterschied zwischen den Versionen
(Neue Version von externer Quelle importiert) |
(kein Unterschied)
|
Aktuelle Version vom 20. Dezember 2015, 21:22 Uhr
Note: The reference to DisplayMessageActivity
will raise an error if you’re using an IDE such as Android Studio because the class doesn’t exist yet. Ignore the error for now; you’ll create the class soon. The constructor used here takes two parameters:
- A
Context
as its first parameter (this
is used because theActivity
class is a subclass ofContext
) - The
Class
of the app component to which the system should deliver theIntent
(in this case, the activity that should be started) Android Studio indicates that you must import theIntent
class.
- A
- At the top of the file, import the
Intent
class: