Android Question Text on Button not show

Discussion in 'Android Questions' started by makis_best, Jul 27, 2019.

  1. makis_best

    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
    [​IMG]

    On the layout I have.....

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

    Code:
    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.
     
  2. klaus

    klaus Expert Licensed User

    You should post a small project showing the problem.
    Without seeing your project it's almost impossible to give a concrete advice.
     
  3. makis_best

    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 = "Α.Φ.Μ."
     
  4. klaus

    klaus Expert Licensed User

    You could also set the TextColor in the Designer.
     
    Shelby, Erel, BillMeyer and 1 other person like this.
  5. Computersmith64

    Computersmith64 Well-Known Member Licensed User

    If you're using 0 for the duration in setTextColorAnimated, why not just use TextColor instead & see if you have the same issue?

    - Colin.
     
  6. makis_best

    makis_best Active Member Licensed User

    @klaus & @Computersmith64 Both tested and the result is the same.
    No text showing but only when I use AFMBtn.SetTextColorAnimated(0, Colors.Black)
     
  7. klaus

    klaus Expert Licensed User

    Post your project, so we could see where the problem is.
     
    Peter Simpson likes this.
  8. jimmyF

    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.
     
  9. jimmyF

    jimmyF Active Member Licensed User

    Just curious. Did you resolve this?
     
  10. makis_best

    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.
     
    jimmyF likes this.
Loading...
  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