Skip to content

Using Klaxon to Populate a RecyclerView

Tobias Preuss edited this page Apr 10, 2018 · 8 revisions

On this page we will explore a basic example of creating simple loops to populate a RecyclerView in Android

To start with we will need some JSON To play with. Here is an example of some live data we are going to be using.

{
    "events": [{
                "category": "NON-RELIGIOUS ORGANIZATIONS"
            },
            {
                "category": "GOVERNMENT"
            },
            {
                "category": "SCHOOLS"
            },
            {
                "category": "LIBRARY",
                "events2": [{
                            "news_id": "115",
                            "auto_news_id": "medlib_aced55f96298e4c53b358f5cb1c063d2",
                            "news_id_parent": "115",
                            "series_id": "48",
                            "news_style": "",
                            "news_finalized": "0",
                            "news_owner": "0",
                            "news_title": "SLAY",
                            "news_contact": "",
                            "news_listdate": "1494443624",
                            "news_start_listing": "",
                            "news_start_date": "1507669200",
                            "news_expiration": "1507672800",
Clone this wiki locally