Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Hi I working with my android, I have two spinners and using retrofit to populate my spinners. I manage to populate first spinner. But I don't know how to get my second spinner populated under id selected from first spinner. I'm using codeigniter rest controller to pass the id and want to retrieve it using retrofit for second spinner, but I don't know how to do this? Please help me.
I already created Rest Controller by passing the id. Already created ApiInterface. And beans to get details data. First spinner working good.
publicinterfaceApiInterface{//first spinner@GET("Testpage/provinsi")Call<GetProvinsi> getProvinsi();//second spinner that I needed how to pass the id? and get data by id selected from first spinner@GET("Testpage/kotabyprovid/provinsi_id/")Call<GetKota> getKota();}
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that
you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice
sessions to improve your knowledge and scores.
manpreet
Best Answer
2 years ago
Hi I working with my android, I have two spinners and using retrofit to populate my spinners. I manage to populate first spinner. But I don't know how to get my second spinner populated under id selected from first spinner. I'm using codeigniter rest controller to pass the id and want to retrieve it using retrofit for second spinner, but I don't know how to do this? Please help me.
I already created Rest Controller by passing the id. Already created ApiInterface. And beans to get details data. First spinner working good.
Declaration
ApiInterface
GetProvinsi ( First Spinner )
}
GetKota ( Second Spinner )
}
First Spinner to get all data. I'm trying to select the id to populate second spinner from the adapter.