android - How to use Nested RecyclerView to get intended design -
i'm having json format below, i'm able fetch json data android using retrofit after fetching i'm not getting how display in horizontal recyclerview in vertical recyclerview shown in below image, want aaaaa displayed instead of section1 , name1 instead of item1 , respective image displayed. please me write android code this.
{"result": {"aaaaa":[{"firm_name":"name1","image_path":"1.jpg"}, {"firm_name":"name2","image_path":"2.jpg"}], "bbbbb":[{"firm_name":"name1","image_path":"1.jpg"}], "ccccc":[{"firm_name":"name1","image_path":"1.jpg"}], "ddddd":[{"firm_name":"name1","image_path":"1.jpg"}], "eeeee":[{"firm_name":"name1","image_path":"1.jpg"}] } } json code
here pojo class
package com.example; import com.google.gson.annotations.expose; import com.google.gson.annotations.serializedname; public class example { @serializedname("result") @expose private result result; public result getresult() { return result; } public void setresult(result result) { this.result = result; } }
package com.example; import java.util.list; import com.google.gson.annotations.expose; import com.google.gson.annotations.serializedname; public class result { @serializedname("aaaaa") @expose private list<aaaaa> aaaaa = null; @serializedname("bbbbb") @expose private list<bbbbb> bbbbb = null; @serializedname("ccccc") @expose private list<object> ccccc = null; @serializedname("ddddd") @expose private list<object> ddddd = null; @serializedname("eeeee") @expose private list<object> eeeee = null; public list<aaaaa> getaaaaa() { return aaaaa; } public void setaaaaa(list<aaaaa> aaaaa) { this.aaaaa = aaaaa; } public list<bbbbb> getbbbbb() { return bbbbb; } public void setbbbbb(list<bbbbb> bbbbb) { this.bbbbb = bbbbb; } public list<object> getccccc() { return ccccc; } public void setccccc(list<object> ccccc) { this.ccccc = ccccc; } public list<object> getddddd() { return ddddd; } public void setddddd(list<object> ddddd) { this.ddddd = ddddd; } public list<object> geteeeee() { return eeeee; } public void seteeeee(list<object> eeeee) { this.eeeee = eeeee; } }
Comments
Post a Comment