ACL v4.6 interfering with module layout
Hi,
I'm new to b4a so this could be something really simple and prove just what a n00b I am.
I'm trying to use ACL v4.6 in my project so that I can have a button that toggles the flash on and off, basically a torch. It's not the primary function of my project but it is an important secondary function.
My problem is that before I added any code my project worked fine. The layout loaded and looked as intended.
Once I added the flashlight code it messes with the layout.
This has the unfortunate effect of showing a blank screen, but the buttons, text boxes etc are still there, just that everything shows up black so you can't actually see anything.
I've tried putting the ac.initialize in activity_create before the loadlayout and that has the effect of messing with the layout colours (basically you can see the buttons and text box but the background is black and any text entered into the textbox is black so you cannot see it).
This has been the case on the AVD emulator and a Samsung Galaxy SIII.
The project works fine apart from that (including the torch on/off button!!).
I'm only really interested in the flashlight function of ACL so if there is an alternative way I'd use that.
Any help would be greatly appreciated.
Hi,
I'm new to b4a so this could be something really simple and prove just what a n00b I am.
I'm trying to use ACL v4.6 in my project so that I can have a button that toggles the flash on and off, basically a torch. It's not the primary function of my project but it is an important secondary function.
My problem is that before I added any code my project worked fine. The layout loaded and looked as intended.
Once I added the flashlight code it messes with the layout.
B4X:
Sub Globals
....
.....
Dim ac As AdvancedCamera
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("cdclayout")
End Sub
Sub Activity_Resume
ac.Initialize(Activity, "ac")
End Sub
This has the unfortunate effect of showing a blank screen, but the buttons, text boxes etc are still there, just that everything shows up black so you can't actually see anything.
I've tried putting the ac.initialize in activity_create before the loadlayout and that has the effect of messing with the layout colours (basically you can see the buttons and text box but the background is black and any text entered into the textbox is black so you cannot see it).
This has been the case on the AVD emulator and a Samsung Galaxy SIII.
The project works fine apart from that (including the torch on/off button!!).
I'm only really interested in the flashlight function of ACL so if there is an alternative way I'd use that.
Any help would be greatly appreciated.
Last edited: