Android Question Change label text background color

FERNANDO SILVEIRA

Active Member
Licensed User
Hello Guys,

I'm creating an array of labels by code and, as far as I could see, the text background property (among others) is not available by code.

Is that true?
In this specific case each label.text will have a single letter (ie, A B C D ... Z) but the background color is important.
Is there an alternate solution for that? Otherwise I wont accomplish the desired result.

B4X:
    wLeft = 10dip
    For i = 0 To wWordShuffled.Length - 1
        lblLetter(i).Initialize("lblLetter")
        wLetter = wWordShuffled.SubString2(i, i+1)
        Log(wLetter)
        lblLetter(i).Text = wLetter
        lblLetter(i).TextColor = Colors.White
        lblLetter(i).TextSize = 50
        lblLetter(i).left = wLeft
        Activity.AddView(lblLetter(i), lblLetter(i).left, 200dip, 35dip, 80dip)
        wLeft = wLeft + 50dip
        GDetector(i).SetOnGestureListener(lblLetter(i), "Gesture"&i)
    Next

Regards,
Fernando
 

FERNANDO SILVEIRA

Active Member
Licensed User

Good point you addressed here. Borders and shadows are my next challenge.

Thanx.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…