android – how to retrieve data from mysql in nested Recyclerview like Playstore-ThrowExceptions

Exception or error:

enter image description here

enter image description here

Here is my horizantal recyclerview image.
I retrieved the data from mysql but how to show different data in every recyclerview.

How to solve:

You are trying to update the UI from a Thread that is a callback for the Firebase response.
You should call the method notifyDataSetChanged(); from the UI Thread.

Try this:

getActivity().runOnUiThread(new Runnable() {
    @Override
    public void run() {
         blogPostRecyclerAdapter.notifyDataSetChanged();
    }
});

Leave a Reply

Your email address will not be published. Required fields are marked *