User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not 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
3 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.