Hi guys, it’s been a little while from last time xD
Hi guys, it’s been a little while from last time xD
I have a question for the advanced users:
There is a way to call the “Add Item” menu in a specific container?
]]>
< ![CDATA[
By script? I’d say LL.runAction with ADD_ITEM as function ID, maybe with container used as item. Not tested, though, but in theory should work.
http://www.pierrox.net/android/applications/lightning_launcher/script/reference/net/pierrox/lightning_launcher/script/api/LL.html#runAction(int, net.pierrox.lightning_launcher.script.api.Item, java.lang.String)
]]>
< ![CDATA[
Visually: add shortcut with LL action Add Item.
]]>
< ![CDATA[
Yes Lutz Linke, by using scripts. I will try your solution and then I’ll report back
]]>
< ![CDATA[
Lutz Linke unfortunately it doesn’t work.
LL.runAction(22,container,null) is not rocognized as method, so i tried to remove container as parameter and it works…
But it adds the new item in the same container in which the script is launched.
What i plan to do is to run the script in a container and to show the “Add Item” menu in another container.
]]>
< ![CDATA[
You can also, after it is added, take the added item from the container where the script is run (you will need to check which one…) and move it to the desired container.
Not easy…But technically doable
]]>
< ![CDATA[
I had already considered this option, but I had preserved it as a last resort.
If there is no way to use the “add item” action outside the context of the current container I will do as you suggested or something like that.
You have some ideas?
]]>
< ![CDATA[
Simone Boccuzzi Just out of curiosity… Did you try using the container’s item (container.getOpener)? Item is a legit parameter. For ADD_ITEM it might be evaluated.
]]>
< ![CDATA[
Simone Boccuzzi Another workaround: add a shortcut with LL Action “Add item” to the container. Place it outside the visible area, maybe even pin it there. Give it a name, then in script getItemByName and call the launch() method of it.
]]>
< ![CDATA[
OK i tried and LL accept it as parameter, but LL adds the new item in the same container in which the script is launched D:
]]>
< ![CDATA[
Lukas Morawietz any idea??
]]>
< ![CDATA[
No. There is no exposed variable representing this menu context. Lightning doesn’t use standard view focus. I can’t reverse engineer because of obfuscation.
]]>
< ![CDATA[
What a pity…
So i guess i should create something new that emulates that action but modified to reach my goals.
Something like a dialog…
Thanks anyway to all of you for your help 🙂
]]>
< ![CDATA[
I’ll try to add this for 12.7, although this is not 100% certain I will be able to do it.
http://www.lightninglauncher.com/flyspray/index.php?do=details&task_id=12
]]>