Okay. now I have changed the code to this:

@Override
     public boolean onCreateOptionsMenu(Menu menu) {
          super.onCreateOptionsMenu(menu);
          @SuppressWarnings("unused")
        MenuItem ng = menu.add("New Game");
        @SuppressWarnings("unused")
        MenuItem rs = menu.add("reset Scores");
          return true;
     }

     public boolean onOptionsItemSelected(MenuItem ng, MenuItem rs) {
            setBoard();
return true;
//the above should only happen if the Selected MenuItem is ng
            wins = 0;
         draws = 0;
         loses = 0;
         won.setText("Won: " + wins);
         lost.setText("Lost: " + loses);
         drawn.setText("Drawn: " + draws);
         setBoard();
         return true;
     //the above till previous comment should only happen if selected item
is rs
         }

I can't figure out how to do the stuff mentioned in the comments.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to