Issue
I am attempting to update a RecyclerView after an HTTP request is made. With the code in the gists below, I am able to open the android activity, render a blank RecyclerView, and get the data from the HTTP Request. I am unable to update the RecyclerView with the data from the HTTP Request.
Below are links the two classes in question for the data
Currently, nothing shows up in the RecyclerView after the HTTP Response is received even though I have the data. How would I populate the RecyclerView after the HTTP response?
Solution
i think you are missing the list items count in the adapter view please update the below method in your ItemSelectionAdapter
@Override
public int getItemCount() {
return data.size();
}
might it can help you to resolve your issue and another thing is that your are setting adapter to recycle view in post execute method so no need to called method after set adapter
adapter.notifyDataSetChanged();
it is not required called the above line after set new adapter to recycle view
Answered By - Navin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.