filmov
tv
How to create multiple layouts and menu items in your Android App? - Switch layouts and exit menu

Показать описание
In this video it shows how one can create multiple layouts in their Android App and switch between them easily by using setContentView command.
Further, it shows how one can create menu items for their Android App and switch between different layouts using the menu options selection. Exit option in the menu is shown which can be used to exit the App using the finish() API.
I hope you liked this video. For any questions, suggestions or appreciations, please reach out to us at:
For complete source code of this project please refer to the below link:
The Java code of this App is available below:
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
}
public void homelayoutButton(View view){
}
public void secondlayoutButton(View view){
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater menuInflater = getMenuInflater();
}
@Override
break;
break;
finish();
}
}
}
/************/
Further, it shows how one can create menu items for their Android App and switch between different layouts using the menu options selection. Exit option in the menu is shown which can be used to exit the App using the finish() API.
I hope you liked this video. For any questions, suggestions or appreciations, please reach out to us at:
For complete source code of this project please refer to the below link:
The Java code of this App is available below:
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
}
public void homelayoutButton(View view){
}
public void secondlayoutButton(View view){
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater menuInflater = getMenuInflater();
}
@Override
break;
break;
finish();
}
}
}
/************/
Комментарии