Android Question Load text file with SmartString Literal

hibrid0

Active Member
Licensed User
Longtime User
Hi guys I want to load a text file with some smartstring literal inside.

For example:

I try with:
Testfile.txt:
Name: ${Var1}
Last Name ${Var2}

And:
$"Name: ${Var1}
Last Name ${Var2}"$

On B4A:
B4X:
Dim Var1, Var2 as string
Var1= "John"
Var2= "Doe"
Dim Text1 as string
Text1= File.ReadString(File.DirAssets, "Testfile.txt")
Editext1.Text= Text1

And on finish app show the textbox with the text and with ${var1} and ${var2}, not the value from the variables.

AUTOANSWER:
This is a compile time feature. You cannot load the strings from a file for example. (https://www.b4x.com/android/forum/threads/b4x-smart-string-literal.50135/#content)
 
Last edited:
Top