Translations:Android Training/Starting Another Activity/22/en: Unterschied zwischen den Versionen

Aus Android Wiki
(Neue Version von externer Quelle importiert)
 
(kein Unterschied)

Aktuelle Version vom 20. Dezember 2015, 21:22 Uhr

Nachricht im Original (Android Training/Starting Another Activity)
Every <code>Activity</code> is invoked by an <code>[[Intent]]</code>, regardless of how the user navigated there. You can get the <code>Intent</code>that started your activity by calling <code>[http://developer.android.com/reference/android/app/Activity.html#getIntent() getIntent()]</code> and retrieve the data contained within the intent.
# In the <code>java/com.mycompany.myfirstapp</code> directory, edit the <code>DisplayMessageActivity.java</code> file.
# Get the intent and assign it to a local variable.

Every Activity is invoked by an Intent, regardless of how the user navigated there. You can get the Intentthat started your activity by calling getIntent() and retrieve the data contained within the intent.

  1. In the java/com.mycompany.myfirstapp directory, edit the DisplayMessageActivity.java file.
  2. Get the intent and assign it to a local variable.