title: Both of my alert dialogs are showing when I press a button for one in my Android Activity
body: <p>I have an activity with a menu inflator. There are two items which each should open there own dialog box. However when I press one both dialogs are opened on top of each other.</p>
  
  <p>One of the two of the below classes are used depending on the button pressed. This is the execution line in the menu switch/case</p>
  
  <pre><code>case R.id.action_vote:
              VoteDialog.voteDialogShow(this);            
  
          case R.id.action_admin:
              AdminDialog.adminDialogShow(this);
  </code></pre>
  
  <p>These are the two dialog classes.. I removed some of the code for readability.</p>
  
  <pre><code>public class AdminDialog {
  
      public static void adminDialogShow(final Context context){
  
          final AlertDialog.Builder adminAlert = new AlertDialog.Builder(context);
  
          adminAlert.setTitle("Restricted Area!");
          adminAlert.setMessage("Enter Access Code:");
  
          adminAlert.setView(input);
          //....
          //Setup text and buttons......
          //....
          adminAlert.show();
      }
  }
  
  public class VoteDialog {
  
      public static void voteDialogShow(final Context context){
  
          final AlertDialog.Builder voteAlert = new AlertDialog.Builder(context);
  
          //....
          //Setup text and buttons......
          //....
  
          voteAlert.setView(input);
  
          //....
  
          voteAlert.show();
      }
  }
  </code></pre>