Hello,
I am using CSBuilder and char sequence objects to show colored text on an EditText view.
The test code I am using is:
Each line of text will be created independently over time and I need the List to hold all the individual lines of text.
And it produces the following output:
I need to send this colored text to another device (think Erel's Walkie-Talkie example from years ago) via network sockets.
The network connection between devices is all set, but how would I transfer the List of CSBuilder objects and data defining the colored text.
I am guessing I will have to somehow create binary data representing the list of objects and send that binary data to the other device via network sockets.
On the other device I will re-create the List of CSBuilder objects.
I'm not sure how I would do this, or even where to get started.
Can someone point me in the right direction for transferring this List of CSBuilder objects representing colored text to another device?
Thanks,
Barry.
I am using CSBuilder and char sequence objects to show colored text on an EditText view.
The test code I am using is:
B4X:
Dim cs As CSBuilder
Dim clst As List
clst.Initialize
cs.Initialize.Color(Colors.Red).Append("This is Red" & CRLF).PopAll
clst.Add(cs)
cs.Initialize.Color(Colors.Green).Append("This is Green" & CRLF).PopAll
clst.Add(cs)
cs.Initialize.Color(Colors.Blue).Append("This is Blue" & CRLF).PopAll
clst.Add(cs)
cs.Initialize.Color(Colors.DarkGray).Append(txt).PopAll
clst.Add(cs)
cs.Initialize
For Each c1 As CSBuilder In clst
cs.Append(c1)
Next
edText.Text = cs
Each line of text will be created independently over time and I need the List to hold all the individual lines of text.
And it produces the following output:
I need to send this colored text to another device (think Erel's Walkie-Talkie example from years ago) via network sockets.
The network connection between devices is all set, but how would I transfer the List of CSBuilder objects and data defining the colored text.
I am guessing I will have to somehow create binary data representing the list of objects and send that binary data to the other device via network sockets.
On the other device I will re-create the List of CSBuilder objects.
I'm not sure how I would do this, or even where to get started.
Can someone point me in the right direction for transferring this List of CSBuilder objects representing colored text to another device?
Thanks,
Barry.