Hi Martin,
I'm got myself a pretty nice widget to change profiles. It's basically got 4 buttons and in the middle the current state of which profile is active. That's all nice, but I'd rather have the current profile button highlighted instead of having a sloppy text in the middle. I've been playing around with the widget.xml and tried to inject global variables in there to see if I could change the color of a layer, but... nope. Doesn't work.
Now I've been thinking about what you'd need to change to be able to add variable support in each and every field of a widget. That's just an insane amount of work. And would clutter the UI a lot. So I thought, well actually what would be just as simple would be to have a condition on each layer, that would enable/disable the layer. With a simple condition, I could create a layer ontop of each of the four buttons with an alpha value, that would highlight the current active profile.
Would it be possible to get that? .... please
Cheers
Loris
Use global variables in widgets or conditionals
Moderator: Martin
Re: Use global variables in widgets or conditionals
Hi,
You can modify most settings of a widget or the elements on the widget using a script in a flow.
There is a hint about this feature at the end of the widget tutorial: http://automagic4android.com/en/help/cr ... tom-widget
I highly recommend to use the Function-button to select the function setWidgetElementProperty. This will show a dialog to select the widget, element and the property to modify. I also highly recommend to give the elements and the widget itself a good name before you start writing scripts.
Regards,
Martin
You can modify most settings of a widget or the elements on the widget using a script in a flow.
There is a hint about this feature at the end of the widget tutorial: http://automagic4android.com/en/help/cr ... tom-widget
I highly recommend to use the Function-button to select the function setWidgetElementProperty. This will show a dialog to select the widget, element and the property to modify. I also highly recommend to give the elements and the widget itself a good name before you start writing scripts.
Regards,
Martin
Re: Use global variables in widgets or conditionals
Wow! Didn't know that existed! Thanks! That's even better!