title: updating the ContentView of android dialog without close when it is showing
body: <p>I am trying to show my custom view in a <strong>dialog</strong> bu using <strong>alertDialog.Builder</strong> with below code snippet.</p>
  
  <pre><code>AlertDialog.Builder alertViewBuilder = null;
  AlertDialog alertViewDialog = null;
  public void showPopupView(View popupView) {
  
  if (alertViewBuilder == null) {
      alertViewBuilder = new AlertDialog.Builder(ctContext);
  }
      alertViewBuilder.setView(popupView);
  
  if (alertViewDialog == null)
      alertViewDialog = alertViewBuilder.create();
  
  if (!alertViewDialog.isShowing())
      alertViewDialog.show();
  }
  </code></pre>
  
  <p>if user perform any action on the components of that custom view, i wants to change/update the content of the <strong>dialog</strong>. so when user touches/clicks on any component of the custom view i am updating the <strong>popupView</strong> and passing the updated <strong>popupView</strong> to <strong>showPopupView(View popupView)</strong> again. but view is not getting updated on the <strong>dialog</strong>.</p>
  
  <p>My requirement is similar the following example.</p>
  
  <ol>
  <li><p>showing login page with <strong>username</strong>, <strong>password</strong> Text-input Fields and "<strong>OK</strong>" button on a dialog.</p></li>
  <li><p>if user entered wrong username/password and press "<strong>OK</strong>" button the same <strong>Dialog</strong> should be updated with a view which will have an Error message textview instead of <strong>username</strong> &amp; <strong>password</strong> Text-input Fields and "<strong>OK</strong>" button should be replaced with <strong>"Try Again"</strong> Button on the same Dialog.</p></li>
  <li><p>when user press "Try Again" button previous login page should be displayed on the same Dialog.</p></li>
  </ol>
  
  <p>I mean flow should some thing similar to the changing view's on same activity.
  I think i've provided the sufficient information about my problem. 
  Please suggest me some solution to my problem.
  Thanks in Advance.</p>