Dears,
Kindly, i would like to know why this code is not working???
the program is hanging and then it says: richstring demo isnt responding , do you want to clos it???
Kindly, i would like to know why this code is not working???
B4X:
Sub Activity_Create(FirstTime As Boolean)
End Sub
Sub Activity_Resume
Dim Label1 As Label
Label1.Initialize("label1")
Label1.Color = Colors.White
Label1.TextColor = Colors.Black
Label1.TextSize = 20
Label1.Gravity = Gravity.CENTER
Activity.AddView(Label1, 10dip, 10dip, 300dip, 100dip)
Dim rs As RichString
Dim rsb As RichStringBuilder
Dim st As String
st=123
rs.Initialize("This is not ") ' can use a String, RichString or RichStringBuilder
rsb.Initialize
rsb.Append(rs)
rsb.Append("a RichString")
rsb.Append(st)
' formatting using string indices
rs.Initialize(rsb) ' use Initialize instead of asignation like a normal String
rs.Color(Colors.Blue, 0, 4)
rs.RelativeSize(1.5, 0, 4)
rs.Typeface("serif", 0, 4)
rs.Underscore(5,7)
rs.Strikethrough(8, 11)
rs.Color(Colors.Red, 14, 18)
rs.Style(rs.STYLE_BOLD_ITALIC, 14, 24)
rs.Color2(Colors.Green,"123")
Label1.Text = rs
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
the program is hanging and then it says: richstring demo isnt responding , do you want to clos it???