Android Question Rich string Problem

Discussion in 'Android Questions' started by AbbasMohammed, Jul 15, 2015.

  1. AbbasMohammed

    AbbasMohammed Member Licensed User

    Dears,
    Kindly, i would like to know why this code is not working???

    Code:
    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, 10dip10dip300dip100dip)
      
        
    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, 04)
        rs.RelativeSize(
    1.504)
        rs.Typeface(
    "serif"04)
        rs.Underscore(
    5,7)
        rs.Strikethrough(
    811)
        rs.Color(
    Colors.Red, 1418)
        rs.Style(rs.STYLE_BOLD_ITALIC, 
    1424)
        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???
     
  2. AbbasMohammed

    AbbasMohammed Member Licensed User

    Ok...i got it
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    It is better to post the solution or explanation so this thread can help other members...
     
    ArminKH, AbbasMohammed and DonManfred like this.
Loading...