Android Question Text on Button not show

makis_best

Well-Known Member
Licensed User
Longtime 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
121wfnr.jpg


On the layout I have.....

Code: Copy
Sub Globals
    Private AFMBtn As Button
End Sub

And....

Code: Copy
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.
 
Strange....

The problem solved only when I put on Activity_Create(FirstTime As Boolean)
AFMBtn.SetTextColorAnimated(0, Colors.Black)
AFMBtn.Text = "Α.Φ.Μ."
 
Upvote 0
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.
 
Upvote 0
Just to test, try reducing your text/font size to 10 or less in the designer or just before adding the text.
 
Upvote 0
Just curious. Did you resolve this?
 
Upvote 0
@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.
 
Upvote 0
Back
Top