Android Studio: Start another activity
Revision as of 07:37, 4 March 2022 by Onnowpurbo (talk | contribs) (Created page with "==Respond to the Send button== file app > java > com.example.myfirstapp > MainActivity, add the following sendMessage() method stub: public class MainActivity extends AppCo...")
Respond to the Send button
file app > java > com.example.myfirstapp > MainActivity, add the following sendMessage() method stub:
public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } /** Called when the user taps the Send button */ public void sendMessage(View view) { // Do something in response to button } }