Change the Selected Spinner Value

Hello, Xamarin,

I am currently making an Android app with Visual Studio. I have two activities: one main activity that will do the work, and the help activity that contains the data that will be sent back to the main activity. I can set the values for the TextViews, Seekbar, and EditTexts. But I can't seem to find a way to do this on a Spinner. Is there any way that I can change the selected value of the spinner?

I will attach my code files into this thread. To maintain compatibility with the uploader, I changed it into TXT files. The files are:

  • Help.axml (the HelpActivity layout)
  • Main.axml (the MainActivity layout)
  • ExpandableListView_Item.txt (actually it's a custom ListView layout)
  • CipherData.cs (the Ciphers class that contains cipher data (name, description, etc.)
  • Cipher.cs (the main processor of the cipher)
  • MainActivity.cs (the Android activity that runs the ciphers)
  • HelpActivity.cs (the activity with the data to be sent
  • CipherDataAdapter.cs (the adapter for the custom ListView)


  • cwphillicwphilli USMember ✭✭✭

    Without examining your code, I typically use setSelection (documentation)

    Is there an excerpt of code where you are attempting to set the spinner that is not working as you expect?

  • HDX13_BeatCodeHDX13_BeatCode IDMember ✭✭

    @cwphilli Actually, I'm just confused on how to do it. I will try this out. If my emulators don't break.

Sign In or Register to comment.