How to set two adapters to one RecyclerView? : <p>I am developing an android app in which I'm storing two different types of information on 'FirebaseDatabase`.</p>

<p>Then in the <code>MainActivity</code>, I'm retrieving them and showing to users in a <code>RecyclerView</code>. Both information are meant to be shown in different layouts, i.e., the layouts for both of them are different and that's why I have two make two different Model class and now have 2 different adapters. I'm using <a href="https://github.com/mikepenz/FastAdapter" rel="noreferrer">FastAdapter</a> by @MikePenz</p>

<p>So, what I did is I set the adapter on recyclerview in the same sequence as the information is fetched from database:</p>

<p>1.</p>

<pre><code>public void prepareDataOfSRequests() {
        gModelClass = new GModelClass(postedBy, ***, ***, ***, "error", ***, formattedTime, currentLatitude, currentLongitude, utcFormatDateTime, userEmail, userID, null, ***, itemID);
        fastItemAdapter.add(0, gModelClass);
        recyclerView.setAdapter(fastItemAdapter);
        recyclerView.smoothScrollToPosition(0);
        emptyRVtext.setVisibility(View.INVISIBLE);
    }
</code></pre>

<p>2.</p>

<pre><code>public void prepareDataOfERequests() {
        eModelClass = new EModelClass(***, ***, ***, ***, "error", ***, formattedTimeE, currentLatitudeE, currentLongitudeE, utcFormatDateTimeE, userEmailE, userIDE, null, ***, ***, ***, ***, itemID);
        fastItemAdapterER.add(eventRequestsModelClass);
        recyclerView.setAdapter(fastItemAdapterER);
        recyclerView.smoothScrollToPosition(0);
        emptyRVtext.setVisibility(View.INVISIBLE);
    }
</code></pre>

<p>as the recyclerview is only one and I'm setting 2 different adapters one by one, the recyclerview is getting updated with the 2nd adapter and showing only it's content.</p>

<p>So, how can I show or set both the adapter to the same 'RecyclerView' and can show the content stored in both the adapters.</p>
