title: My Android AlertDialog is not moving up out of the way when the keyboard is shown
body: <p>So I have a alert dialogue which I call from an activity when a button is pressed:</p>
  
  <pre><code>Button editLocation = (Button) itemView.findViewById(R.id.edit_trained_location_button);
      editLocation.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
              showEditLocationDialog();
          }
      });
  
  
  public void showEditLocationDialog(){
  
      LayoutInflater inflater = activity.getLayoutInflater();
      AlertDialog.Builder builder =
              new AlertDialog.Builder(activity, R.style.AppTheme);
      builder.setTitle("Edit Location name");
      builder.setPositiveButton("Save", null);
      builder.setNegativeButton("Cancel", null);
      builder.setView(inflater.inflate(R.layout.location_dialog, null));
      Window newLocationDialog = builder.show().getWindow();
  
      newLocationDialog.setLayout(DpToPxHelper.convertToPx(350, activity),
                                  DpToPxHelper.convertToPx(175, activity));
      newLocationDialog.setDimAmount(.8f);
      newLocationDialog.addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
  
  }
  </code></pre>
  
  <p>Here is a the layout file.</p>
  
  <pre><code> &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
   &lt;EditText
      android:isScrollContainer="false"
      android:id="@+id/location_name_edit_text"
      android:inputType="text"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="16dp"
      android:layout_marginLeft="4dp"
      android:layout_marginRight="4dp"
      android:layout_marginBottom="4dp"/&gt;
   &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>(The buttons are defined in the builder, the layout only allows me to create an EditText field).</p>
  
  <p>So my problem is when I bring up the keyboard to enter text into the EditText field the dialogue isn't pushed up so the buttons at the bottom are blocked:</p>
  
  <p><a href="http://i.stack.imgur.com/nwjZM.png" rel="nofollow">Before keyboard</a></p>
  
  <p><a href="http://i.stack.imgur.com/ulqjB.png" rel="nofollow">After Keyboard</a></p>
  
  <p>So what's weird is the text inside of the dialogue is pushed up...but the window isn't :(.</p>
  
  <p><strong>What I've tried:</strong></p>
  
  <ol>
  <li><p><code>&lt;android:windowSoftInputMode="adjustPan"&gt;</code>
  I've added that to the manifest.xml and observed that it still doesn't move     the dialogue box up.</p></li>
  <li><p><code>&lt;activity android:windowSoftInputMode="adjustPan|adjustResize"&gt; &lt;/activity&gt;
  </code> I've tried this as well but it still has no affect.</p></li>
  <li><code>getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
  </code> I've also tried that with no luck, the same behaviour happens the dialogue doesn't move up but the text inside gets pushed up.</li>
  <li>Not trying anything (so no declaring in the manifest or .setSoftInputMode(...) ) I see the same behaviour so I don't think steps 1,2,3 have had any affect anyway.</li>
  </ol>
  
  <p>So I've tried everything I could find on this site and I'm struggling to find a solution.  I feel the issue is related to the layout some how.</p>
  
  <p>If anyone can help me find a solution that would be great.</p>
  
  <p>Thanks</p>