Skip to content
Advertisement

Data parsed correctly from server but Android recyclerview is empty

I made an online music player with PHP code server and I have no problem fetching data in JSON format. I have a problem with the Android side where no data is shown in my recyclerview although I initialized it correctly. Please help me to find out what’s wrong.

Here’s my code:

MainActivity:

JavaScript

ListAdapter:

JavaScript

Class to get my data by help of Volley Library:

JavaScript

My data model:

JavaScript

Advertisement

Answer

Your codes work correctly and there’s no problem with them. Did you test it on emulator? Try to wipe data on emulator or test on physical device. Your problem should be solved.

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