This is the code :
It takes about 4 seconds to load the file ,and what happens is that
the message "Loading file" is displayed after the array is loaded.
Is it possible to display the "Loading file" before the array is loaded.
B4X:
Sub Load_wordsarray_with_wordsfile
Dim TextReader1 As TextReader
Dim line As String
Dim i As Int
Dim words_array (300000)
ToastMessageShow("Loading file ", True)
TextReader1.Initialize(File.OpenInput(File.DirAssets, "file.txt"))
line = TextReader1.ReadLine
Do While line <> Null
words_array(i)= line
line = TextReader1.ReadLine
i=i+1
Loop
TextReader1.Close
End Sub
It takes about 4 seconds to load the file ,and what happens is that
the message "Loading file" is displayed after the array is loaded.
Is it possible to display the "Loading file" before the array is loaded.