Hi,
I try to generate a bitmap with a background color and text on it. I only get the background color.
This is my code:
What is wrong?
Is there an easier way to generate this bitmap?
BR, André
I try to generate a bitmap with a background color and text on it. I only get the background color.
This is my code:
B4X:
Dim Foto as Bitmap
Dim cnvPnl As Canvas
Dim imv As ImageView
If imv.IsInitialized = False Then
imv.initialize("")
Activity.AddView(imv,10dip,10dip,200dip,200dip)
imv.Gravity=Gravity.FILL
End If
imv.Visible=False
imv.Color=Colors.blue
cnvPnl.Initialize(imv)
cnvPnl.DrawText("AH",0,0,Typeface.DEFAULT,30,Colors.Yellow,"CENTER")
Foto=cnvPnl.Bitmap
What is wrong?
Is there an easier way to generate this bitmap?
BR, André