Code example for MenuItem

Methods: setOnMenuItemClickListener

0
 
public boolean onCreateOptionsMenu(android.view.Menu menu) {
	 
MenuItem item = menu.add(0, 0, 0, "Take Picture");
 
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
  public boolean onMenuItemClick(MenuItem item) {
	  takePicture(); 
	   
      return true; 
  } 
}); 
 
 
return true; 
} 
 
private void sendPicture () 
{ 
	if (currentPhotoFile != null)
	{