No. But you can save the informations to rebuild them using CSBuilder
you can save as html file but then you need a webview or some htmltextview if that exists to see the fancy stuff.
Oh well. The only other thing I could find on the web as it relates to CS-Strings is "Parcel", but that only relates to inter-process communications. The only other thing I could think of is to create a class around CSBuilder that you call instead of CSBuilder. This class then records methods and parameters internally that could be written out to some sort of command string. That command string can then be fed to the same class to recreate the CS-String.So this is not the solution.
Make something in Java (Java online) that passes as a CSBuild parameter as charsequence and then transform it into a Byte Array to be saved in a file and vice versa
Sub Class_Globals
Private cs As CSBuilder
Private data As List
Private ser As B4XSerializator
End Sub
Public Sub Initialize As PCSBuilder
cs.Initialize
data.Initialize
If False Then
'to avoid obfuscation issues.
CallSub(Me, "Color")
CallSub(Me, "Append")
CallSub(Me, "Pop")
CallSub(Me, "PopAll")
End If
Return Me
End Sub
Public Sub FromBytes(b() As Byte) As PCSBuilder
Dim list As List = ser.ConvertBytesToObject(b)
For Each o() As Object In list
If o.Length = 1 Then
CallSub(Me, o(0))
Else
CallSub2(Me, o(0), o(1))
End If
Next
Return Me
End Sub
Public Sub ToBytes As Byte()
Return ser.ConvertObjectToBytes(data)
End Sub
Public Sub Color (clr As Int) As PCSBuilder
cs.Color(clr)
data.Add(Array("color", clr))
Return Me
End Sub
Public Sub Append (Text As Object) As PCSBuilder
cs.Append(Text)
data.Add(Array("append", Text))
Return Me
End Sub
Public Sub Pop As PCSBuilder
cs.Pop
data.Add(Array("pop"))
Return Me
End Sub
Public Sub PopAll As PCSBuilder
cs.PopAll
data.Add(Array("popall"))
Return Me
End Sub
Public Sub ToCharSequence As Object
Return cs
End Sub
Dim p As PCSBuilder
Activity.Title = p.Initialize.Append("hello ").Color(Colors.Red).Append("world").PopAll.ToCharSequence
Dim b() As Byte = p.ToBytes
Label.Text = p.Initialize.FromBytes(b).ToCharSequence
That's not true, I waited for 10 posts before posting my answerErel doesnot leave any challenge for us he is hunting all likes in the forum
It is best to post it in the additional libraries forum.I think this belongs to the snipped section
There is no reason to compile it. It is better to distribute the source code. Developers can always compile it to a library if they like.i have not compiled the classes to a b4a lib to let you the possibility to see the code and maybe modify it.
i have added the Image span. Please make correction. I think it is missing adding the bitmap to the list. I added the code to the class as shown below:i have not added the Image span (i was too tired, sorry)
'Adds image span: bitmap,width,height,True or False
Public Sub Image(bmp As Bitmap, Width As Int, Height As Int, Baseline As Boolean) As PCSBuilder 'Mahares
cs.Image(bmp, Width, Height, Baseline)
'Some additional code must be missing here to add the image to the list
Return Me
End Sub