Sunday, 15 September 2013

how link menu to new page in android -


This is my code, but it crashes:

  public boolean onCreateOptionsMenu ( Menu menu) {Submenu sub = menu.addSubMenu (0, 1, 1, "Register"); Sub.add (0, 3, 1, "Register Book"); Sub.add (0, 4, 2, "Register new book"); Menu.add (0, 2, 2, "Report"); Return Super. Secret Option Menu (menu); } Public Boolean On Options Item Selected (Menu Item Item) {Switch (ITAT. ITMID)} {Case 4: Intent Intent = New Intent (book activism. This, newbookActivity.class); BookActivity.this.startActivity; break; Return super.onOptionsItemSelected (item); }}  


No comments:

Post a Comment