Translations:Android Training/Starting Another Activity/3/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)
The <code>android:onClick</code> attribute’s value, <code>"sendMessage"</code>, is the name of a method in your activity that the system calls when the user clicks the button.
# In the <code>java/com.mycompany.myfirstapp</code> directory, open the <code>MyActivity.java</code> file.
# Within the <code>MyActivity</code> class, add the <code>sendMessage()</code> method stub shown below.

The android:onClick attribute’s value, "sendMessage", is the name of a method in your activity that the system calls when the user clicks the button.

  1. In the java/com.mycompany.myfirstapp directory, open the MyActivity.java file.
  2. Within the MyActivity class, add the sendMessage() method stub shown below.