2025-04-18 12:23 AM
Hi all,
I am looking for advices to implement my GUI. I have screen 1 with all the widgets.
On this screen by default has:
1. The texts for Hours:Minutes:Seconds and a button to switch to setting screen to set the count down timer.
2. The switch mode button, to switch the timer 1 to timer 2.
Timer 1 has different texts and looks vs. timer 2.
The rest of the widgets on screen 1 stay exactly the same.
Currently, I have a solution buy copy exactly the same screen 1 and just replace the timer texts and button only, and using switch mode button to switch back and forth the screen 2 to screen 1 and vice versa.
I found this is wasting the memory resource and additional coding to handle different screens.
Question:
Is there a way I can use only screen 1 and change texts and button between timer1 vs. timer2?
Solved! Go to Solution.
2025-04-25 9:05 AM
Thank you for your advice I got the part of locking figured out. The second part, unlock the screen, by disable the flexButtonLockSCreen is the one I still struggle to achieve.
My device has only screen is the main access, so when I implemented the touch to disable the flexButtonLockSCreen, I got the issue I locked the screen successfully, when the screen lock, set the device down to table, I will touch the screen again hence the screen is unlocked.
2025-04-28 4:07 AM
Hello @Jtron.11 ,
So in the example I share, when you click on Button B, you lock, the screen by adding a flex button that is invisible over the whole screen.
There is no interaction linked to this flex button so it is not possible to unlock that screen through touch.
I don't understand what you mean by
set the device down to table, I will touch the screen again hence the screen is unlocked.
If you put your device down, nothing will happen. If you touch the screen, nothing will happen, the screen will stay locked.
You can unlock the screen by setting the flex button invisible.
Regards,
2025-04-28 6:34 AM
You can unlock the screen by setting the flex button invisible.
Yes, I understood, and that is exactly what I have done. The problem for this is now the entire screen can be use for unlock just one touch
I am trying to lock the screen so users won't accidentally touch buttons, and to unlock, I need the user to do extra steps (or at least something hard to hit) to prevent the un-intentional touch.
May I ask what you would do to make the flex button invisible when you have only access is the screen? No other hardware button, no software timer.
2025-04-28 7:52 AM
Hello @Jtron.11 ,
Please find attached an example.
Regards,
2025-04-30 7:25 AM
Thank you so much for your help.
The example is the perfect solution. May I learn why you need to add a box the same size of the entire screen and same size of the invisible lock button?
2025-04-30 7:58 AM
Hello @Jtron.11 ,
I am glad you found it helpful! :)
You don't have to add the box, you can remove it. I just added a black box and set it's alpha value (transparency) to 100 to give the visual effect of a disabled screen.
Regards,