Hi
I want to know about expression with overlay widget visibility. Is this possible? If yes? How?
Expression widget
Moderator: Martin
Expression widget
- Attachments
-
- screenshot.png (180.48 KiB) Viewed 13123 times
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1
Samsung Galaxy j2 non rooted.
Android 5.1.1
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: Expression widget
Just use a script:
overlay=true
overlay=true
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)
Re: Expression widget
Hi
Digitalstone I am using an overlay name = 44 for example and the script is [44= true] is not working as I wish.any modification?
Digitalstone I am using an overlay name = 44 for example and the script is [44= true] is not working as I wish.any modification?
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1
Samsung Galaxy j2 non rooted.
Android 5.1.1
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: Expression widget
No i mean you should create a custom boolean variable to be able to evaluate if your overlay is on/off.
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)
Re: Expression widget
Hi Digitalstone
Please give me one example.
Please give me one example.
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1
Samsung Galaxy j2 non rooted.
Android 5.1.1
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: Expression widget
Place your widget overlay action.
Connect that to a script action in which you type something like: global_overlay-name = true
Then, whenever you want to check anywhere if that widget overlay is on or off, you can now just place a condition in which you type the name of your overlay variable.
Connect that to a script action in which you type something like: global_overlay-name = true
Then, whenever you want to check anywhere if that widget overlay is on or off, you can now just place a condition in which you type the name of your overlay variable.
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)
Re: Expression widget
It has been requested as feature before, to check whether an overlay is being shown or not : viewtopic.php?f=4&t=7142
The new feature probably can query using condition "Overlay SSown". The field can have multiple overlay checkbox, support global pattern. then there is invert checkbox to reverse the logic. (needed because sometimes we want to define all other widget besides the selected ones)
As for now, use glovar to store your widget state. (sorry to rephrase digitalstone post, I have typed this finish before the post) Add action script after you have show the widget.
Then after hiding it, add script
Later you can query the glovar to check widget visibility.
You can use glovar map type, so you don't waste so many glovar solely for this. Create a glovar to store the state of the overlay you use frequently. At glovar, create global_widget as map type. Then at the script use
There you can create as many overlay state you want (example : global_widget["network stats"], global_widget["shutter button"], etc), and you only require single glovar to store all of them.
The new feature probably can query using condition "Overlay SSown". The field can have multiple overlay checkbox, support global pattern. then there is invert checkbox to reverse the logic. (needed because sometimes we want to define all other widget besides the selected ones)
As for now, use glovar to store your widget state. (sorry to rephrase digitalstone post, I have typed this finish before the post) Add action script after you have show the widget.
Code: Select all
global_widget_callbutton = true;
Code: Select all
global_widget_callbutton = false;
Code: Select all
global_widget_callbutton; //widget is being shown?
//or global_widget_callbutton == true, above is the shortened version.
Code: Select all
global_widget["callbutton"] = true; // or false when hiding it.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.