How to use ExpandListView with Retrofit JSON data

475 viewsAndroid Development Questions
0
0 Comments
"locations": [
        {
            "zone_id": 1,
            "name_arabic": "الدوحة",
            "name_english": "Doha",
            "locations": [
                {
                    "id": 11,
                    "country_id": "1",
                    "zone_id": "1",
                    "location": "Madinat Khalifa South",
                    "location_ar": "مدينة خليفة الجنوبية",
                    "lat": "25.315289",
                    "lng": "51.480346"
                },
                {
                    "id": 12,
                    "country_id": "1",
                    "zone_id": "1",
                    "location": "Fereej Kulaib",
                    "location_ar": "فريج كليب",
                    "lat": "25.314038",
                    "lng": "51.491459"
                },
                {
                    "id": 13,
                    "country_id": "1",
                    "zone_id": "1",
                    "location": "Wadi Al Sail",
                    "location_ar": "وادي السيل",
                    "lat": "25.30864",
                    "lng": "51.505412"
                },
                {
                    "id": 14,
                    "country_id": "1",
                    "zone_id": "1",
                    "location": "Al Messila",
                    "location_ar": "المسيلة",
                    "lat": "25.300646",
                    "lng": "51.481212"
                },
                {
                    "id": 15,
                    "country_id": "1",
                    "zone_id": "1",
                    "location": "Fereej Bin Omran",
                    "location_ar": "فريج بن عمران",
                    "lat": "25.304561",
                    "lng": "51.495562"
                }
]
Changed status to publish
0

Hello,

First, you need to understand how to use Retrofit or any other android network library to download your source data in Json format.

We have a tutorial that can help you get started with it – https://inducesmile.com/android/android-retrofit-2-with-json-api-example/

Once you are able to get your Json data, you can have a look on our tutorial on how to create an Expandable ListView with RecyclerView below.

How to Create Expandable List With RecyclerView in Android

If you have any questions you can let me know.

 

Changed status to publish
You are viewing 1 out of 1 answers, click here to view all answers.