Skip to content
Advertisement

Using RecyclerView and getting information from Web services but not displaying answers and I’m not getting any errors WHY?

JavaScript

Adapter

JavaScript

Network

JavaScript

Logcats

JavaScript

SomeBody help me in this one,I’m not getting any errors but Still answers not displaying ? why? Thank you.

Advertisement

Answer

In your Recyclerview adapter addAll method, after adding to the array make a call to notifyDataSetChanged()

like this:

JavaScript

Update:

As per comments the code works when you use dummy data and this points to another issue in your network request logic. You can debug your application by placing various breakpoints in methods or on lines of code to help ascertain where your codes logic is not functioning as expected. https://developer.android.com/studio/debug Any other questions you have should be in a new question as this one is really solved.

Id also suggest using a library like Volley which will greatly simplify your network requests. Specifically see Making a standard request in Volley

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement