Lesson 1 - How to add button click and open new screen




  • create one java and one xml
  • add activity of second java class in manifest.xml
  • go to first.xml add android:onClick="buttonClick" in Button
  • go to first.java add public void buttonClick (View view){
  • Intent clickIntent = new Intent (this, SecondActivity.class);
  • startActivity(SecondActivity);
  • }

Latest
Previous
Next Post »

1 comments: