Hi,
I am working on a suite of multi-lingual dictionary/thesaurus apps. I have used Android/Java to develop my previous apps but now am trying to develop using B4A.
I made a simple app that takes an English word in an EditText field. When "Search" button is tapped, it shows Sanskrit translations in another EditText field. I am not using SQL to store data. Instead, I use a Unicode text file having Sanskrit, English words with newline delimiter. It is a CSV file to be honest, having thousands of words. One more thing, I have several Sanskrit terms for a single English word so the results show up like this with / delimiter:
Some Sanskrit term / Some Sanskrit term /Some Sanskrit term /Some Sanskrit term
The problem is that the Sanskrit terms do not even show up and the result I get is like:
/ / - / / / / /
I have tried changing font to SANS-SERIF and SERIF in the "Visual Designer" but the only difference I can see that when setting to SERIF it shows rectangular block characters instead of spaces. Would like to add that I have tested the code on emulator only and not on a real device as my testing tab is gone for repair and I don't normally test on my phone.
Please help me to find a solution to this problem. My thanks in advance for any assistance!
The relevant code below:
Screenshots below (it is pre-alpha so sorry for plain black bg lol):
I am working on a suite of multi-lingual dictionary/thesaurus apps. I have used Android/Java to develop my previous apps but now am trying to develop using B4A.
I made a simple app that takes an English word in an EditText field. When "Search" button is tapped, it shows Sanskrit translations in another EditText field. I am not using SQL to store data. Instead, I use a Unicode text file having Sanskrit, English words with newline delimiter. It is a CSV file to be honest, having thousands of words. One more thing, I have several Sanskrit terms for a single English word so the results show up like this with / delimiter:
Some Sanskrit term / Some Sanskrit term /Some Sanskrit term /Some Sanskrit term
The problem is that the Sanskrit terms do not even show up and the result I get is like:
/ / - / / / / /
I have tried changing font to SANS-SERIF and SERIF in the "Visual Designer" but the only difference I can see that when setting to SERIF it shows rectangular block characters instead of spaces. Would like to add that I have tested the code on emulator only and not on a real device as my testing tab is gone for repair and I don't normally test on my phone.
Please help me to find a solution to this problem. My thanks in advance for any assistance!
The relevant code below:
B4X:
'SEARCH ENGLISH TERM IN THE DICTIONARY LIST
Sub searchInDictES (searchTerm As String)
Dim eng, sans, sansResult As String
Dim listLen As Int
listLen = lstDictEng.Size 'LIST SIZE
sansResult = "" 'EMPTY RESULT VARIABLE
Try
edtResults.Text = "Searching.. Please wait.."
pause(200)
For i = 0 To listLen-1
eng = lstDictEng.Get(i)
If eng.ToLowerCase = searchTerm.ToLowerCase Then
sans = lstDictSans.Get(i)
sansResult = sansResult & " / " & sans
End If
Next
edtResults.Text = sansResult 'Print in the result window..
Catch
msgL(LastException) 'DEBUG
End Try
End Sub
Screenshots below (it is pre-alpha so sorry for plain black bg lol):