Android Code Snippet Change Tab Stop on Labels and Listview using CSBuilder

Discussion in 'Code Snippets' started by William Lancee, May 6, 2019.

  1. William Lancee

    William Lancee Member Licensed User

    b4a_screenshot.png As the title says. The method is based on span manipulation used in the thread below. If this is an existing solution, let me know, I couldn't find it.

    Sub Activity_Create(FirstTime As Boolean)
    Dim lbl As Label
        lbl.Color = 
        lbl.TextSize = 
    Activity.addView(lbl, 10dip50dipActivity.Width-20dip50dip)
    Dim cs As CSBuilder
    Colors.Blue).Append("here" & TAB & "there")
    0)        'without this it doesn't work
        CallSub3(Me, "AddFirstTabStop", cs, Array As Int(350dip))
        lbl.Text = cs.PopAll
    End Sub

    Sub AddFirstTabStop(cs As Object, atStop() As Int)
    Dim span As JavaObject
    Dim jo As JavaObject = cs
    End Sub
    Note: I have tested it with Listview and it works, however if you change the backgroundColor of the item, the tab space color is not changed.


    Attached Files:

    Last edited: May 7, 2019
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice