Android Question Cannot set spinner index [solved]

Discussion in 'Android Questions' started by Didier9, Apr 19, 2019.

  1. Didier9

    Didier9 Active Member Licensed User

    I have attached a simple app showing the problem. It creates an array of spinners. The idea is to select a particular entry for each and display it but it will not display the selected index.
    Tested on Android 5.1 and 9.
    The answer is probably staring at me in the face but I can't see it.
    Any help appreciated...

    Attached Files:

  2. klaus

    klaus Expert Licensed User

    The problem are the text colors.
    Adding these two lines just after adding the Spinners onto pnlPage works.
    spnSwitch(i).TextColor = Colors.Black
    spnSwitch(i).DropdownTextColor = Colors.White

    Didier9 likes this.
  3. Didier9

    Didier9 Active Member Licensed User

    Thank you Klaus, I knew it was going to be embarrassing...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice