Hi
I am not able to restore the background color of previous panel after open and close a camera.
In nuce below the functions that create a light gray background with an image:
Here the functions that activate the camera:
At last closing the camera:
The panel is recreated with buttons and image but the background is black.
I have also attempted with visibility on/off, SendToBack/brìngToFront and activity.inalidate.
Thanks
John Rossati
I am not able to restore the background color of previous panel after open and close a camera.
In nuce below the functions that create a light gray background with an image:
B4X:
Sub createPanel()
pnl.Initialize("")
pnl.Color = Colors.LightGray
addButton("btnAnamnesis","Anammnesis",0)
btnTakePicture = addButton("btnCamera","Take Picture",1)
...
pnl.SetBackgroundImage(LoadBitmapResize(File.DirAssets, "bigGaleno.png", 100%x, 100%y, True)).Gravity = Gravity.CENTER
Activity.AddView(pnl,0,0,100%x,100%y)
formData.Text = editData2(data,": ",Chr(10))
End Sub
B4X:
Sub btnCamera_Click
Activity.LoadLayout("camera")
pnl.RemoveView
camEx.Initialize(cameraPanel)
OpenCamera(frontCamera)
End Sub
B4X:
Sub btnExitPicture_Click
camEx.Stop
cameraPanel.RemoveView
createPanel
End Sub
I have also attempted with visibility on/off, SendToBack/brìngToFront and activity.inalidate.
Thanks
John Rossati