Hello, I would like to change a label text color by downloading a string from an online stored .txt file that contains requested values xxx, xxx, xxx, xxx but I get an error when I try to debug the app.
Sub hc_avversario_ombra_ResponseSuccess(Response As HttpResponse, TaskId As Int)
That will fail because ARGB expects 4 integers, you will have to parse the result like this:
B4X:
Dim Values() As String
Dim Result As String
Result = Response.GetString("UTF8")
Values = Regex.Split(",", Result)
data_avversario_ombra.TextColor = Colors.ARGB(Values(0), Values(1), Values(2), Values(3))
I did it as margret advised using njdude code
thank you for rapid support!
There's just a problem in yours, njdude: "values" must be string too because the split can't use two different types of variables