I can understand what a big difference developing on iOS is to Android so here’s the basics:
- In Android, you have activities, which is just a fancy way of saying pages or views. You have an XML layout file and a Java file which performs functionality tasks.
- In order to switch between activities you need to create intents.
Here’s a sample I’ve just made:
XML File 1
<LinearLayout>
//Layout stuff in here
</LinearLayout>
Java File 1
public void nextActivity(View view)
{
Intent intent = new Intent(this, NextActivity.class);
startActivity(intent);
}
Java File 2
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
setupActionBar();
Intent intent = getIntent();
}
If you need further help, follow this link
0
solved How to set up more than one activity in android development? [closed]