Android Question Text on Button not show

makis_best

Active Member
Licensed User
Hi

I have a button on a layout.
I load the layout from one activity.
The button work correct but no text show no matter what color I select on the designer.
On the designer I have


On the layout I have.....

B4X:
Sub Globals
    Private AFMBtn As Button
End Sub
And....

B4X:
Sub AFMBtn_Click
    If Main.G1.Phone_Connection = True Then
        If Main.G1.ValidateAFM(AFMEditText.Text) = True Then
            TaxisDownload("XXXXXXX", "XXXXXX", "XXXXXXX", AFMEditText.Text)
        Else
            Msgbox("Λάθος Α.Φ.Μ.", "Προσοχή")
        End If
    Else
        Msgbox("Δέν υπάρχει πρόσβαση στο Internet", "Προσοχή")
    End If
End Sub
Everything working fine but no text.
 

makis_best

Active Member
Licensed User
Strange....

The problem solved only when I put on Activity_Create(FirstTime As Boolean)
AFMBtn.SetTextColorAnimated(0, Colors.Black)
AFMBtn.Text = "Α.Φ.Μ."
 

Computersmith64

Well-Known Member
Licensed User
Strange....

The problem solved only when I put on Activity_Create(FirstTime As Boolean)
AFMBtn.SetTextColorAnimated(0, Colors.Black)
AFMBtn.Text = "Α.Φ.Μ."
If you're using 0 for the duration in setTextColorAnimated, why not just use TextColor instead & see if you have the same issue?

- Colin.
 

jimmyF

Active Member
Licensed User
Just to test, try reducing your text/font size to 10 or less in the designer or just before adding the text.
 

jimmyF

Active Member
Licensed User
Just curious. Did you resolve this?
 

makis_best

Active Member
Licensed User
@jimmyF I try lot of things... between them and that you said...
I create and other project for test... and all of them working fine.
Just that one it didn't....
For the moment I just use AFMBtn.SetTextColorAnimated(0, Colors.Black)

I am ok with it.... I mean I get the result I want.
Not normal but ok.
 
Top