Search code examples
javaandroidjsoup

Load content dynamically with JSoup - data doesn't inflate


I'm trying to create an app which is parsing HTML data into RecyclerView. Using JSoup, I'm trying to make:

  • A static fragment as a homepage,
  • A dynamic fragment with content being changed on click in NavigationView.

  • Full code is on GitHub, I've already opened an issue. The thing is content doesn't load properly - after inflating Fragment no data is being shown, although I can see a successful creation of ArrayList with my data in logs.
    I think the problem is with the ViewHolder inside ContentAdapter. I've put the Log.d inside both onCreateViewHolder and onBindViewHolder - no logs are shown during load process.

    Every single data there is public, as the app is being created for local grant project - it'll also be published in Play Store when finished.

    Thanks in advance for any help provided!


    Solution

  • I've found the answer already. I've created Utils class for storing the most important values and passing them to activities or fragments. All I had to do was to reformat Utils to singleton pattern - when I was calling Utils previously, no data was shown because of different instances. After making this class a singleton, data was collected and displayed properly.