title: Android RxJava joining lists
body: <p>Trying to understand all that RxJava stuff. I was doing following example:</p>
  
  <pre><code>private Observable&lt;List&lt;String&gt;&gt; query1() {
      List&lt;String&gt; urls = new ArrayList&lt;&gt;();
      urls.add("1");
      urls.add("2");
      urls.add("3");
      urls.add("4");
  
      return Observable.just(urls);
  }
  
  private Observable&lt;List&lt;String&gt;&gt; query2() {
      List&lt;String&gt; urls = new ArrayList&lt;&gt;();
      urls.add("A");
      urls.add("B");
      urls.add("C");
      urls.add("D");
  
      return Observable.just(urls);
  }
  </code></pre>
  
  <p>and then tried to join two lists:</p>
  
  <pre><code> Observable.zip(
              query1(),
              query2(),
              new Func2&lt;List&lt;String&gt;, List&lt;String&gt;, Observable&lt;String&gt;&gt;() {
                  @Override
                  public Observable&lt;String&gt; call(List&lt;String&gt; a1, List&lt;String&gt; a2) {
                      List&lt;String&gt; list = new ArrayList&lt;&gt;();
                      list.addAll(a1);
                      list.addAll(a2);
                      return Observable.from(list);
                  }
              })
              .subscribe(new Action1&lt;String&gt;() {  // &lt;-- It says, cannot resolve method subscribe
                  @Override
                  public void call(String string) {
                      String text = testTextView.getText().toString();
                      testTextView.setText(text + "\n" + string);
                  }
              });
  </code></pre>
  
  <p>What I'm doing wrong? I was expecting to get in my view
      1
      2
      3
      4
      A
      B
      C
      D</p>
  
  <p><strong>EDIT1</strong> I ended with the following answer:</p>
  
  <pre><code>    Observable.zip(
              query1(),
              query2(),
              new Func2&lt;List&lt;String&gt;, List&lt;String&gt;, List&lt;String&gt;&gt;() {
                  @Override
                  public List&lt;String&gt; call(List&lt;String&gt; a1, List&lt;String&gt; a2) {
                      List&lt;String&gt; list = new ArrayList&lt;&gt;();
                      list.addAll(a1);
                      list.addAll(a2);
                      return list;
                  }
              })
              .flatMap(new Func1&lt;List&lt;String&gt;, Observable&lt;String&gt;&gt;() {
                  @Override
                  public Observable&lt;String&gt; call(List&lt;String&gt; urls) {
                      return Observable.from(urls);
                  }
              })
              .subscribe(new Action1&lt;String&gt;() {
                  @Override
                  public void call(String string) {
                      String text = testTextView.getText().toString();
                      testTextView.setText(text + "\n" + string);
                  }
              });
  </code></pre>
  
  <p><strong>EDIT2</strong> <code>concat</code> solution as suggested by ihuk would be much better in this case. Appreciate for all the answers.</p>