Hello,
I have an app where I want to make a full-screen semi-transparent mask panel to prevent button presses.
I have several apps compiled with previous versions (2.22 or older) that use mask panels, but in my latest app compiled with version 2.5 when I set the transparency of the mask panel to anything 254 and below the panel becomes completely transparent. If I set the transparency to 255, the panel becomes opaque as expected.
I have tested on devices with Android versions ranging from 2.3 to the latest.
Any ideas?
Thanks,
Barry.
--- Added Later ---
I just modified the code.
Instead of dynamically creating the panel, mp, I created the panel in the designer.
Now when I set the color to semi-transparent it behaves as expected.
It does not appear to be a 2.5 problem but a difference between dynamically creating the panel or statically creating the panel in the designer.
There must be some property set in the designer that I am not setting when I create the panel dynamically.
Does anyone know what this could be?
Thanks again,
Barry.
I have an app where I want to make a full-screen semi-transparent mask panel to prevent button presses.
I have several apps compiled with previous versions (2.22 or older) that use mask panels, but in my latest app compiled with version 2.5 when I set the transparency of the mask panel to anything 254 and below the panel becomes completely transparent. If I set the transparency to 255, the panel becomes opaque as expected.
B4X:
dim mp as panel
mp.Initialize("MaskPanel") ' mask panel
Activity.AddView(mp, 0, 0, 100%x, 100%y)
mp.Color = Colors.ARGB(254, 0,0,0) ' 255 opaque, <= 254 completely transparent
mp.BringToFront
I have tested on devices with Android versions ranging from 2.3 to the latest.
Any ideas?
Thanks,
Barry.
--- Added Later ---
I just modified the code.
Instead of dynamically creating the panel, mp, I created the panel in the designer.
Now when I set the color to semi-transparent it behaves as expected.
It does not appear to be a 2.5 problem but a difference between dynamically creating the panel or statically creating the panel in the designer.
There must be some property set in the designer that I am not setting when I create the panel dynamically.
Does anyone know what this could be?
Thanks again,
Barry.
Last edited: