now browsing by category
Scripting help request :)
I’ve set up my new desktop with a sidebar which has shortcuts to different positions (pages) on my desktop. I want to be able to highlight whichever shortcut is for the current position (similar to the sidebar on the Inbox app).
So basically I need to highlight an item in a folder based on desktop position and have no idea where to start. I recall a post from a whole back from someone who did something similar based on which folder they had open but I can’t find the post now. Any help would be greatly appreciated.
]]>Damn, I uploaded 4 videos and only the first one is shown in the post.
Damn, I uploaded 4 videos and only the first one is shown in the post. Here are the others, incl one “near-real-life-sample”:
https://plus.google.com/photos/106201536507820539535/albums/6111768607528079185
Originally shared by Lutz Linke
Swap Cards-Script with Accordion- or Stack-Effect – Version 3
I was busy and added some requested (and non-requested) features.
– Alpha Fading : Cards removed/added can be faded out/in (var cardFadeOut=true;)
– Faded lower cards : Cards not in focus can be alpha faded (var cardAlphaLower=128;)
– Variable Overlap : Overlap (the shows part in proportion of row height/column width) can be adjusted (var cardOverlapSize=1.0;)
– External Triggers : Triggers can be placed outside of the panels, i.e. on desktop or in a different panel. Panels can reside on desktop or inside another container (var cardContainerName=”pnlStack”;). Name is used to match card (i.e. “btnCard01” >> “pnlCard01”)
– Swipe Gestures : Swipe gestures on desktop and items (i.e shortcuts) can be used to trigger swap up/down the stack (set name “prefix{NEXT}” or “prefix{NEXT}”)
– “Cards” must not be panels, but can also be items, i.e. shortcuts
– Fixed bugs in AnimateItems script
– Wrapper : a “wrapper” script can be used to change any parameters of the original script without need to change it
– Reverse direction for Stack : cards on the lower half will by default be pushed to top in reverse order (“pulled from bottom”) automatically, but direction can be set fixed to “U”p or “D”own (i.e var cardFixedDirection=”U”;);
– *Fixed Orientation” : if automatic detection of horizontal or vertical stack fails, the orientation can be fixed (i.e var cardFixedOrientation=”H”;)
Example for wrapper script:
 var param={};
 param.cardPanelPrefix=”pnlMyCard”;
 param.cardTriggerPrefix=”btnMyCard”;
 param.cardContainerName=”pnlMyStack”;
 var evt=LL.getEvent()
 param.evtSource=evt.getSource();
 var evtItem=evt.getItem();
 if(evtItem!=null) {
  param.evtItemId=evtItem.getId();
 }
 LL.runScript(“Cards_SwapAccordion”,JSON.stringify(param));”,”flags”:0,”id”:1}
(Cards prefixed with “pnlMyCard” will be searched in panel named “pnlMyStack” (fallback to desktop if not found) and buttons prefixed with “btnMyCard” will be recognized as triggers.)
See the videos, I also added an example how to use non-panel items (her: headers as “do nothing”-shortcuts) as secondary stack.
Template (download and place ZIP in /sdcard/LightningLauncher) and scripts can be downloaded from here:Â https://app.box.com/LLCardSwapDemo
Reference post:Â http://goo.gl/3vvFKz
]]>With all this material.. Here’s a bit of animation! I’d like to see what you guys might do with it!!
With all this material.. Here’s a bit of animation! I’d like to see what you guys might do with it!!
]]>In the new betas, there is now a new selection effect: material. But it is only available in android 5+
In the new betas, there is now a new selection effect: material. But it is only available in android 5+
This is a script I had before this effect were implemented. It emulates the new material effect in any android version.
(Note: you don’t need to be in the beta, but if you are not, to pass extra data use ‘launch shortcut/lightning action/run script’)
Instructions:
Set the script to run in the tap action.
Important: if you don’t specify any extra data to the script the effect will be the one of the right. If you specify something (any) the effect will be the one of the left.
Change the color selection in the box if necessary.
After the animation finish the item will be launched.
You can change the frames parameter in the script. More frames means smoother but slower.
]]>I have a request.
Thanks in advanced for anyone who is interested. 
]]>Swap Cards-Script with Accordion- or Stack-Effect
Swap Cards-Script with Accordion- or Stack-Effect
Scripts and 2-Desktop-Demo-Template are ready for download here:
https://app.box.com/LLCardSwapDemo
The template can be merged with exiting setups, won’t leave much of a trace. Just remove the desktops and propably the scripts.
This video shows how to change basic settings in the scripts and how they influence the effect.
Main settings are:
 var cardPanelPrefix=”pnlCard”; : Panels to be used for swapping must use this prefix in their name (“+”-tab), i.e. “pnlCard01”.
 var cardElasticity = 0.5; : Amount of space between animated cards. Lower value=closer, higher vslue=further.
 var fxAnim=”P”; : Animation Style/Curve: “L”inear, “P”ower (x^pow), “E”xponential (base 2), “B”ack (little bounce).
 var animDelay = 0; : Animation delay per step in milliseconds
 var animSteps = 32; : Steps to use for animation
Additional settings for Card Stack:
 var cardFadeOut=true; : Fade out cards when removing from top of stack.
 var cardSwapOutLength=0.75;var cardSwapInLength=0.5; : Duration of swap in/out (portion of animSteps).
How to use:
(1) add panels and name them properly with prefix (“pnlCard01”, etc)
(2) add shortcut that trigger the script to each panel
(3) add “run script” actions (i.e. to tap-event), choose SwapAccordion or SwapStack script
(4) position panels, align horizontally (same y-position) or vertically (same x-position) as you wish
(5) that’s all
Tipps and Tricks:
(1) One shortcut per panel with “tap”-event set to SwapAccordion and “swipe left”-event set to SwapStack works pretty good.
(2) Important is the panel’s alignment, but not their width/height; variations are pretty interesting.
The scripts:
 Cards_SwapAccordion.js : Swaps cards with Accordion-effect. Prepares parameters for Animation Engine.
 Cards_SwapStack.js : Swaps cards with Card Stack-effect. Prepares parameters for Animation Engine.
 Cards_AnimateItems.js : Generic Animation Engine. To be called via RunScript with parameters passed defining the animations to perform (what? how? choreography etc).
Post with short demo video here:Â http://goo.gl/aAJZWl
Original thread that inspired here:Â http://goo.gl/MvWyMW
]]>DEMO for scripted card switching. Accordion-style or Stacked.
DEMO for scripted card switching. Accordion-style or Stacked.
In response to https://plus.google.com/u/0/112116934238314159117/posts/KhZQYMEJr2q
Will upload template with sample screens and scripts with description this evening.
Pradeep Joshi is this like you have in mind?
]]>
]]>
]]>
D5 Creation