title: Rxjava2: Usage of Single & CompositeDisposable
body: <p>Background:</p>
  
  <p>I'm trying to load an image with Glide and rxjava2 (to make use of background thread).</p>
  
  <p>I'm still confused how each component of rxjava2 api works.</p>
  
  <p>So below are my questions.</p>
  
  <p>Q1: Is it impossible to <code>add</code> <code>Single</code> to <code>CompositeDisposable</code>?</p>
  
  <p>Whenever I try to add <code>Single</code> into <code>CompositeDisposable</code>, Android Studio warns me that there is type mismatch.</p>
  
  <p>However if I call <code>toObservable()</code> before <code>subscribeOn</code>, error message goes away.</p>
  
  <p>Q2: Correct my usage of <code>rxjava2</code> with <code>Glide</code> if there are some problems.</p>
  
  <pre><code>   private void loadImages(final String imageUri) {
              Single&lt;GlideRequest&lt;Drawable&gt;&gt; glideSingle = Single.fromCallable(
                      new Callable&lt;GlideRequest&lt;Drawable&gt;&gt;() {
                          @Override
                          public GlideRequest&lt;Drawable&gt; call() {
                              return GlideApp.with(MainActivity.this).load(imageUri);
                          }
                      }
              );
  
              // mSubscription is just new CompositeDisposable()
              mSubscription.add(
                  glideSingle
                          .toObservable() // I have to call this to suppress error message
                          .subscribeOn(Schedulers.io())
                          .observeOn(AndroidSchedulers.mainThread())
                          .subscribeWith(
                                  new DisposableObserver&lt;GlideRequest&lt;Drawable&gt;&gt;() {
                                      @Override
                                      public void onNext(GlideRequest&lt;Drawable&gt; drawableGlideRequest) {
                                          RequestOptions backgroundTransformOptions = new RequestOptions()
                                                  .transforms(
                                                          new CenterCrop(),
                                                          new BlurTransformation(60),
                                                          new ColorFilterTransformation(
                                                                  ContextCompat.getColor(MainActivity.this, R.color.colorBackgroundOverlay))
                                                  );
  
                                          drawableGlideRequest
                                                  .into(mAlbumArt);
  
                                          drawableGlideRequest
                                                  .apply(backgroundTransformOptions)
                                                  .into(mMainBackground);
                                      }
  
                                      @Override
                                      public void onError(Throwable e) {
  
                                      }
  
                                      @Override
                                      public void onComplete() {
  
                                      }
                                  }
                          )
              );
          }
  </code></pre>