How to add intent on menu event
<p>I want to call activity on menu event.I am new to android so i am trying to open new screen on delete option on menu, for this i write switch case but i didnt get how to call another activity in that please help me my code is </p>

<pre><code>@Override
     public boolean onCreateOptionsMenu(Menu menu)
     {
         MenuInflater inflater = getMenuInflater();
         inflater.inflate(R.menu.menu, menu);
         return true;
     }
     @Override
     public boolean onOptionsItemSelected(MenuItem item)
     {
        switch(item.getItemId())
          {
            case R.id.delete:   Intent i= new Intent(this,deleteAct.class);
                                 startActivity(i);break;
            case R.id.edit://calling another  intent; break;
            case R.id.showall://calling another intent; break;
          }
       return true;
     }
</code></pre>

<p>please help me ..</p>
