Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
public boolean onOptionsItemSelected(MenuItem item) {
  return super.onOptionsItemSelected(item);
       switch (item.getItemId()) {
           case R.id.aboutUS:
          =>// here i am getting Unreachable error Intent i = new   Intent("com.code.myapp.ABOUT");
                 startActivity(i);
             break;

           case R.id.preferences:

             break;
       }
       return false;
   }
Posted
Comments
[no name] 24-Sep-15 7:15am    
Your first Statement is a "return"...?

1 solution

Java
public boolean onOptionsItemSelected(MenuItem item) {
 // return super.onOptionsItemSelected(item);
       switch (item.getItemId()) {
           case R.id.aboutUS:
          Intent i = new   Intent("com.code.myapp.ABOUT");
                 startActivity(i);
             break;
 
           case R.id.preferences:
 
             break;
       }
       return false;
   }


-KR
 
Share this answer
 
Comments
CPallini 24-Sep-15 7:51am    
5.
Utkarsh Sharma 24-Sep-15 13:19pm    
sir ,can u plzz explain it why its happen ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900