Android Spinner with dynamic items

HaBe1963HaBe1963 NLMember ✭✭

I've developed a Windows.forms application with Visual Studio which I'm trying to re-develope as an Android app.
In the .exe I do have a Combobox of which I've made the items dynamically with below code:

                    private void Stad_onMouse(object sender, EventArgs e)

                    {
                        Stad.Items.Clear();

                        for (int it = 0; it < StadContents.Count(); it++)
                        {

                            if ((StadContents[it].Stadname).Trim().IndexOf(Stad.Text) != -1)
                            {
                                 Stad.Items.Add(StadContents[it].Stadname);
                            }
                        }
                    } 

The List "StadContents" contains a couple of 100k Citynames. Based on what the user types in in the Comboxbox "Stad" the above code only adds the List items to the Combobox Items which matches with the user input.

My question is if this could also been done with an Android Spinner object and if so how?

Answers

Sign In or Register to comment.