R RichardN Well-Known Member Licensed User Longtime User Oct 21, 2015 #1 ACL Ver 4.60.... B4A Ver 5.20 A parent panel contains a child panel to which the camera is initialised. At the first use the camera preview is correctly displayed and captured. At this point I sent the parent panel to the background using 'pnlParent.Sendtoback'. When the parent panel is brought to the foreground again using 'BringToFront' the camera image is not displayed and the panel remains black. Despite this lack of preview..... Camera.TakePicture works correctly and returns valid data. It appears that changing the zOrder of a camera preview panel's parent breaks the link between the two. This behaviour has been observed on the Samsung S4/Google Nexus. Careful zOrder planning is needed to work around this issue.
ACL Ver 4.60.... B4A Ver 5.20 A parent panel contains a child panel to which the camera is initialised. At the first use the camera preview is correctly displayed and captured. At this point I sent the parent panel to the background using 'pnlParent.Sendtoback'. When the parent panel is brought to the foreground again using 'BringToFront' the camera image is not displayed and the panel remains black. Despite this lack of preview..... Camera.TakePicture works correctly and returns valid data. It appears that changing the zOrder of a camera preview panel's parent breaks the link between the two. This behaviour has been observed on the Samsung S4/Google Nexus. Careful zOrder planning is needed to work around this issue.
klaus Expert Licensed User Longtime User Oct 21, 2015 #2 Instead of sending the panel to the background you could set its Visible property to False.
R RichardN Well-Known Member Licensed User Longtime User Oct 21, 2015 #3 Hi Klaus, that is exactly what I would normally do but this particular program flow did not permit a static zOrder so working around the issue was an unwelcome complication.
Hi Klaus, that is exactly what I would normally do but this particular program flow did not permit a static zOrder so working around the issue was an unwelcome complication.