title: RxJava runs on same blocking UI Thread and doesn't show AlertDialog
body: <p>I'm trying to use RxJava to show a AlertDialog during loading of some method. It doesn't work, UI is blocked for 2 seconds and when stepping through it with Debugger, the debugger shows that it is run on the UI thread. I've added the Schedulers.IO, so what am I doing wrong?</p>
  
  <pre><code>boolean initialize() {
      try {
          Thread.sleep(2000);
      } catch (InterruptedException e) {
      }
      return true;
  }
  
  public AlertDialog showSomePopup(Context context, String msg) {
      return new AlertDialog.Builder(context)
              .setTitle("Loading...")
              .setMessage(msg)
              .setPositiveButton("Ok", null)
              .show();
  }
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      final AlertDialog dialog = showSomePopup(this, "Waiting ..");
  
      Single.just(initialize())
              .subscribeOn(Schedulers.io())
              .observeOn(AndroidSchedulers.mainThread())
              .subscribe(new Consumer&lt;Boolean&gt;() {
          @Override
          public void accept(@NonNull Boolean aBoolean) throws Exception {
              dialog.dismiss();
          }
      });
  }
  </code></pre>