title: Unable To Hide Navigation Bar during AlertDialog/LoginDialog
body: <p>I'm attempting to hide the navigation bar globally through my app running Android 4.2.2</p>
  
  <p>I have managed to use the following (admitadly hackish) method of implementing:</p>
  
  <pre><code>getWindow().getDecorView().setSystemUiVisibility(8);
  </code></pre>
  
  <p>Which successfully removes the Navigation bar (the fact it is hackish is perfectly fine - this is for a kiosk so it will only be installed on a limited number of devices) </p>
  
  <p>Now I'm attempting to remove the navigation bar in places other than my MainActivity - such as when it reappears during an AlertDialog/LoginDialog.</p>
  
  <p>I'm attempting to use:</p>
  
  <pre><code>public Dialog onCreateDialog(Bundle savedInstanceState) {
      AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(getActivity(),R.style.HoloDarkDialog));
      LayoutInflater inflater = getActivity().getLayoutInflater();
  
      variables = SingletonVariables.getInstance();
  
      view = inflater.inflate(R.layout.login, null);
      EditText userEditText = (EditText) view.findViewById(R.id.loginUserIdEditText);
      getWindow().getDecorView().setSystemUiVisibility(8);
  </code></pre>
  
  <p>However this result in the error: </p>
  
  <pre><code>The method getWindow() is undefined for the type LoginDialog
  </code></pre>
  
  <p>Does anyone know of a way this might be avoided? </p>
  
  <h2>Edit:  (additional requested source code)</h2>
  
  <pre><code>// Function to handle show dialog
  public void showLogin(View view, String whichActivity) {
      pd = new ProgressDialog(this.getApplicationContext());
      pd.setMessage("Logging in, Please wait....");
  
      LoginDialog logindialog = new LoginDialog();
      logindialog.setWhichActivity(whichActivity);
      logindialog.show(getFragmentManager(), "MyLogin");
  }
  </code></pre>