Pierre Hébert, I would like to use tasker variables within dynamic text.
Pierre Hébert, I would like to use tasker variables within dynamic text. This would strongly reduce the need of zooper widgets and use only Lightning. Is this possible to implement?
]]>
< ![CDATA[
This is actually possible already (well not for dynamic text, but normal labels)
]]>
< ![CDATA[
This could look like:
1. Create a text only item and name it ‘dynamic’
2. Create a tasker task run when the variable changes pointing to a LL script. Pass the variable as data
3. a script could look like:
LL.getCurrentDesktop().getItemByName(‘dynamic’).setLabel(LL.getEvent().getData(),false);
]]>
< ![CDATA[
Lukas Morawietz thanks, this works fine. I’m noob to scripts but I see, I have to learn it:-)
]]>
< ![CDATA[
Indeed, you need to use a normal label because dynamic text labels are overwritten by computed values.
]]>
< ![CDATA[
Can the text properties (color, size) also be controlled by tasker? Or will html formatting be built into label formatting in a future release?
]]>
< ![CDATA[
Wern-Yuen Tan double yes
]]>
< ![CDATA[
Html formatting will be a basic one as implemented by the Android Html class (http://developer.android.com/reference/android/text/Html.html). Not sure what the exact set of tags is, need to have a look at the code, but certainly far from what a full webkit would do.
]]>
< ![CDATA[
Lukas Morawietz
Thank you, finaly a working script. I was searching all week on the net and in this community, but could not find a working script. Thanks.
]]>