Android Question shadow in button with image and text in button

Justcooldev

Member
Licensed User
Hi,

I have a button in which there is an image and some text.

Thanks to the forum I managed to insert the image and the text.

On the other hand, I cannot manage with this code to make the shadow of the button appear.

What is wrong with my code?

Thank you


B4A:
bt1.As(B4XView).SetColorAndBorder(xui.Color_ARGB(255,106,168,79), 2dip, xui.Color_Black, 9dip)

    SetShadow(bt1.As(B4XView), 30, xui.Color_Black)

    bt1.Text = cs

    

    'Insertion de l'image ménage dans le bouton

    cs.Initialize

    cs.Size(25)

    cs.Alignment("ALIGN_LEFT")

    cs.Color(Colors.Black)

    cs.TypeFace(Typeface.FONTAWESOME)

    cs.Image(LoadBitmap(File.DirAssets, "logomenage.png"), 70dip, 70dip, False).VerticalAlign(1dip).Append("  Menage")

    cs.Append(CRLF)

    cs.PopAll
 
Top