I am very new to Basic4Android programming. I just want to know how to draw a random number from an array.
You can do that by randomizing the total number of items in array example if the items are 10, then randomize first and pass it to a variable. later use that variable to call the array value. Copy the code below and paste in Activity Create Sub and Run
Dim myArray As List ' Declare your Array
myArray.Initialize() ' Initialize array
myArray.AddAll(Array As String("January","February","March","April"))
'Since array values index starts from zero, then four items in a list will be from 0 to 3.
'So randomize 0 to 4
Dim randNum As Int
randNum = Rnd(1,4) 'Generating random number
Log ("Current RAndom Number is " & randNum) 'This will print the random number
'=========PRINT RESULT TO LOGCAT ======
'Since we are generating from 1 to 4, we use -1 (4-1=3 ie April ==Array index starts from 0 to 3)
Log(myArray.Get(randNum-1))