Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. public boolean onOptionsItemSelected(MenuItem item) {
  2. int id = item.getItemId();
  3.  
  4. if (id == R.id.nav_calendar) {
  5. Intent i=new Intent(this, Calendar.class);
  6. startActivity(i);
  7. }
  8. if (id == R.id.nav_info) {
  9. Intent i=new Intent(this, CarInfo.class);
  10. startActivity(i);
  11. }
  12.  
  13. if (id == R.id.nav_expenses) {
  14. Intent i=new Intent(this, Expenses.class);
  15. startActivity(i);
  16. }
  17. if (id == R.id.nav_map) {
  18. Intent i=new Intent(this, Map.class);
  19. startActivity(i);
  20. }
  21. if (id == R.id.nav_service) {
  22. Intent i=new Intent(this, Service.class);
  23. startActivity(i);
  24. }
  25.  
  26. return super.onOptionsItemSelected(item);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement