0

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!

    C0nverter
    • 114
    • 13
    • If contend is created dynamically then most likely it involves JavaScript which is not supported by Jsoup. More info: [Jsoup Java HTML parser : Executing javascript events](https://stackoverflow.com/q/7344258) – Pshemo Jun 24 '18 at 14:11
    • The `Fragment` itself is dynamic - content from Web is static, but depending on selected navigation item, is being changed. – C0nverter Jun 24 '18 at 14:42

    1 Answers1

    0

    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.

    C0nverter
    • 114
    • 13