title: Android Dialog: Removing title bar
body: <p>I have a weird behavior I can't pinpoint the source of.</p>
  
  <p>I have my app with the classic</p>
  
  <pre><code>requestWindowFeature(Window.FEATURE_NO_TITLE);
  </code></pre>
  
  <p>to remove the title/status bar.</p>
  
  <p>I then create a Dialog box to allow the user to enter information (name etc)</p>
  
  <p>With a physical keyboard, no problem but when I use the virtual keyboard I have a strange behavior:</p>
  
  <p>each time I hit a key on the virtual key board the title/status bar reappears pushing all the keyboard layout around then vanishes again (just like the animation of when I start the application)</p>
  
  <p>here is some code : </p>
  
  <pre><code>        dialog = new Dialog(context);
          dialog.setContentView(R.layout.logindialog);
          dialog.setTitle("Login:");
  
          WindowManager.LayoutParams a = dialog.getWindow().getAttributes();
  
  //      dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
  
          a.dimAmount = 0;
          dialog.getWindow().setAttributes(a);
  
          dialog.setCancelable(true);
          dialog.getWindow().setLayout(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);
  </code></pre>
  
  <p>and then</p>
  
  <pre><code>dialog.show();
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
  </code></pre>
  
  <p>but it crashes my app.</p>
  
  <p>here is the xml</p>
  
  <p></p>
  
  <p></p>
  
  <pre><code>    &lt;TextView android:id="@+id/LoginText"
          android:gravity="fill"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Login:"&gt;
      &lt;/TextView&gt;         
      &lt;EditText android:id="@+id/LoginEdit"
          android:layout_height="wrap_content"
          android:singleLine="true"
          android:text="jason"
          android:layout_width="200sp"/&gt;
      &lt;TextView android:id="@+id/PasswordText"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Password:"&gt;
      &lt;/TextView&gt;         
      &lt;EditText android:id="@+id/PasswordEdit"
          android:layout_height="wrap_content"
          android:singleLine="true"
          android:text="welcome"
          android:layout_width="200sp"
          android:password="true"/&gt;
  &lt;LinearLayout 
      android:id="@+id/test2"
      android:gravity="center_horizontal"
      android:orientation="horizontal"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"&gt;
  &lt;Button android:id="@+id/LoginButton"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_centerHorizontal="true"
      android:text="Login" /&gt;
  &lt;Button android:id="@+id/CreateButton"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_centerHorizontal="true"
      android:text="Create" /&gt;
  &lt;Button android:id="@+id/CancelLogin"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_centerHorizontal="true"
      android:text="Cancel" /&gt;
  &lt;/LinearLayout&gt;/&gt;
  </code></pre>
  
  <p></p>