• Uncategorized
  • 0

2.1: Create and Start Activities

1.1 Create the TwoActivities project

buat project baru dengan template empty activity

1.2 Define the layout for the main activity

buat layout seperti dibawah

1.3 Define the button action

membuat metode Onclick

2.1 Create the second activity

2.2 Modify the Android manifest

 

2.3 Define the layout for the second activity

 

2.4 Add an intent to the main activity

3.1 Add an EditText to the main activity layout

dalam tugas ini, kita mengubah explicit intent dalam aktivitas utama untuk meyertakan data tambahan dengan yang yang diinginkan.

3.2 Add a string to the main activity’s intent extras

  

3.3 Add a TextView to the second activity for the message

3.4 Modify the second activity to get the extras and display the message

4.1 Add an EditText and a Button to the second activity layout

4.2 Create a response intent in the second activity

4.3 Add TextViews to the main activity layout to display the reply

4.4 Get the reply from the intent extra and display it

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *