I know that I did this in class, but this should really go in it's own method. The title of this method is "onOptionsItemSelected," and so should just handle that; that is, it should call a method called 'addProjectSelected' or something, and you should move the AlertDialog stuff to that.