htc - Android: Start activity from a MenuItem -


I'm new to Android, and the user is trying to start an activity from a menu event.

Actually, my menu (and is working properly) from my main activity class by using a menuflatler:

  @Override Public Boolean Permit menu (menu Menu) {super.onCreateOptionsMenu (menu); // Menu Inflator class XML file menu Menflett Inflar = Main menu allows to create a menu from the Inflator (this); Inflater.inflate (R.layout.menutest, menu); Back true; }  

and im handling menu selection using the following code (working fine too):

  public boolean-on-option itam selected (menu item Item) {switch (item. GetItemId ()) {case R.Did.MenuEtimanWeb website: ShowScreenAudite (); break; Default: Break; }     return false; }  

I have second and last activity in the name of Adviceite, and I would like to start it, but the following code does not work:

  protected Zero ShowScreenAddSite () {Intent I = New Intro (AddWebsite.class); StartActivity (i); }  

Do you know what extra thing do I have to get from the intent constructor? Thanks in advance. Regards. JOS

The solution was very simple, it seems that in Android, each activity class is automatically referenced Does not contain Manifest.xml.

I only add new activity to the manifest, and I work fine.

Regards Jose


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -