I need to add strings from alertdialog box to spinner at run time. Now i have the alertbox with an edittext and a button.please anyone help me to fix this.
Share
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.
So in your onClickListener of your button in the allertdialog get the spinner element via finViewById and add the text to the spinner’s adapter, e.g.:
Hope my answer hits your problem.