Android Question randomize radiobutton position

Discussion in 'Android Questions' started by Lyndon Bermoy, Mar 30, 2015.

  1. Lyndon Bermoy

    Lyndon Bermoy Member Licensed User

    Im having a problem with this code:
    Code:
    Dim x As List
     
         x.Initialize
         x.AddAll(
    Array As Int(20355065))
       
       
         rbAnswer1.Top =  x.Get(
    Rnd(0,4)) & "%y"
         rbAnswer2.Top =   x.Get(
    Rnd(0,4)) & "%y"
         rbAnswer3.Top =  x.Get(
    Rnd(0,4)) & "%y"
         rbAnswer4.Top =   x.Get(
    Rnd(0,4)) & "%y"
    I want to randomize the position of my radiobutton from only the given value of my List.

    Im having an error of "Invalid Double". But everytime i deleted "%y" on it, it never shows error. But I really need to have "%y" on it. Please help me. Asap
     
  2. NJDude

    NJDude Expert Licensed User

    Just create your list like this:
    Code:
    ...
    x.AddAll(
    Array As Int(20%y35%y50%y65%y))

    ...

    rbAnswer1.Top =  x.Get(
    Rnd(0,4))
     
    thedesolatesoul likes this.
Loading...
  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