I am getting all the values from the webservice. Can we set this value by default in my spinner.like pre populated value for update.
we do like that edittext1.setText("");
So can we do same it for spinner.
please help me for this.
Thnak you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
no its not possible in spinner. you can’t set a title like value in spinner in starting.We have use ArrayAdaper then it will show value that is selected.
Like Spinner.setSelection(position);
Edited to insert data in spinner
Call these code whenever you want to change content of Spinner
first find it by id
and then place this code where ever you want to update spinner data
R.array.array_name is array store in String file in res.you can use your dynamic array too