Hmmm.

Hmmm. Now that we have scripts can anyone think of a way to set my sidebar animation to follow the one used by the Reddit News app? Essentially, the wallpaper/clock would be on top of the sidebars and would slide over to reveal them sitting underneath. Video for demonstration.

http://www.youtube.com/watch?v=2aa1K6BTWBs
]]>

36 Commentsto Hmmm.

  1. Anonymous says:

    < ![CDATA[

    2 words: HOLY SHIT!!!! that would be sweet. i can use it to display my music player and then as i slide further i would reveal some shortcuts or other info or whatever. i 2nd that script tutorial

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Mmm… parallax scrolling

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Yeah. That’d be super sexy.

    ]]>

  4. Anonymous says:

    < ![CDATA[

    I think you could achieve this with two panels in a desktop.


    None of them can scroll horizontally, but could possibly scroll vertically.


    The desktop can be scrolled between two positions which could be set with two stop points maybe, or other means.


    The main content would be the panel on top and it would scroll as you scroll the desktop.


    The side bar would be the panel behind, pinned (at least horizontally), and its position would be set through a script.


    The script would be triggered by the desktop position changed event. This script would set the sidebar panel with a fraction of the current scroll offset, so that its move appears to be a relative move. Now the last thing to do is to actually write this script 😉

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Pierre Hébert good idea you can write if you want so you can test the theory or maybe TrianguloY can write this one.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Curtis Sylvester Jr. this is not just a theory 😉

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Pierre Hébert I am almost done, but can’t make stop points to work on the right side as they do on the left.


    If I put a stop point anywhere on the left of the home page the scrolling will stop there, on the right side it will pause there but I can still scroll until the page end.



    Edit: nvm, I made it work. Had too many stop point options.

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Ok. this is the script. I will add instructions on the wiki and update this post with a link.



    http://www.pierrox.net/android/applications/lightning_launcher/wiki/doku.php?id=script_sidebar_anim

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Bogdan Tautu your script is ok, I tested it and it works fine.


    However….I made a different version which can be easier:



    This just move the panel, not need to be pinned, only detached from the grid (maybe stop points are necessary)




    var id= 393220 //the id of the item


    var amount = 0.5 //the parallax effect, between 0,1




    var cont=LL.getEvent().getContainer();



    var it=LL.getItemById(id);



    it.setPosition(cont.getPositionX()* amount+it.getWidth()* (amount-1),0);

    ]]>

  10. Anonymous says:

    < ![CDATA[

    Ha. You guys are awesome. I figured this would be a fun one to figure out. I’ll play around and see if I can figure out how to get it working [my coding experience is limited to simple html, css, and xml].

    ]]>

  11. Anonymous says:

    < ![CDATA[

    Pasquale J. Festa independently from LL, with a bit of JavaScript your web knowledge will be greatly enhanced 🙂

    ]]>

  12. Anonymous says:

    < ![CDATA[

    Pierre Hébertr it would be to me :p

    ]]>

  13. Anonymous says:

    < ![CDATA[

    TrianguloY, just wanted to say thanks for that script. Works great.


    I edited it just a bit to work with my transparent background.

    ]]>

  14. Anonymous says:

    < ![CDATA[

    Bogdan Tautu Hi. Can you give more details explaining how to? “Set the script on the Position changed event of the desktop” plz. I have no idea. Thx.


    Keep it up with the scripts.

    ]]>

  15. Anonymous says:

    < ![CDATA[

    Sergio Azar


    LL menu > Lightning Settings > Current desktop > Behavior > Events & Actions > Position changed > Run a script

    ]]>

  16. Anonymous says:

    < ![CDATA[

    Hi Guys. I tried to follow the instructions but it’s a bit vague for me, first time user. I’m getting an error. TrianguloY script.” At line 9: TypeError: Cannot call method “setPosition” of null…Thx

    ]]>

  17. Anonymous says:

    < ![CDATA[

    Sergio Azar did you write the correct id of the item?


    It seems to me you just pasted the code as it was in the example.

    ]]>

  18. Anonymous says:

    < ![CDATA[

    This is why the instructions make no sense to me. I have no idea what is needed to make this work. What is the correct id and how do I get it? Can you suggest any good tutorials on script basics?

    ]]>

  19. Anonymous says:

    < ![CDATA[

    Yes, remember to change the id.


    You can find it from the hierarchy menu. It is shown as a succession of numbers and letters, for example 356af34


    Then you need to write it with the prefix 0x (zero, ex)


    var id= 0x567ad44;


    ]]>

  20. Anonymous says:

    < ![CDATA[

    TrianguloY, how would I go about using the item name instead of id?

    ]]>

  21. Anonymous says:

    < ![CDATA[

    LL menu > Items > Hierarchy…


    In front of the item you are looking for is a number starting with # and ending with :


    It is in base 16 so you can expect it to have digits and letters.


    In the script replace the item number found in the example with your number preceded by 0x



    Let’s say you found


    #04000c: Panel


    you will need to replace


    var id= 393220;


    with


    var id= 0x04000c;

    ]]>

  22. Anonymous says:

    < ![CDATA[

    Bogdan Tautu i would have done the same thing and yes i too expect it to work straight out as i have no idea how to write a script. no offense but if i did i wouldnt need to copy/paste someone elses. i would have just written it myself lol Chris Chastain dont feel bad i dont know how scripts work all i know is how to copy/paste it and set the events.

    ]]>

  23. Anonymous says:

    < ![CDATA[

    I didn’t have any trouble using it, but I think if I can use item label instead of id, template would be shareable?

    ]]>

  24. Anonymous says:

    < ![CDATA[

    i wouldnt know what part to edit if it was in my face, i cant read code thats what programmers are for.

    ]]>

  25. Anonymous says:

    < ![CDATA[

    TrianguloY thank you and to you Bogdan. Just to be clear, there are 3 panels, left _ mid _ right with their own id. Am I right by adding the mid panel id details??

    ]]>

  26. Anonymous says:

    < ![CDATA[

    This is my script with label instead of id.


    Don’t forget the stop points.


    And don’t forget to change the label!



    var name= “parallax” //the label of the item


    var amount = 0.5 //the parallax effect, between 0,1




    var cont=LL.getEvent().getContainer();



    var it=cont.getItemByLabel(name);



    it.setPosition(cont.getPositionX()* amount+it.getWidth()* (amount-1),0);

    ]]>

  27. Anonymous says:

    < ![CDATA[

    you still need to edit the script!

    ]]>

  28. Anonymous says:

    < ![CDATA[

    TrianguloY, awesome…thank you sir! I have more questions on this subject. I’ll ask elsewhere.

    ]]>

  29. Anonymous says:

    < ![CDATA[

    Thanks again guys. I’ll post the result when I finish my homescreen.

    ]]>

  30. Anonymous says:

    < ![CDATA[

    Bogdan Tautu if i knew how i wouldnt need to copt/paste in the first place

    ]]>

  31. Anonymous says:

    < ![CDATA[

    thats what was looking for . Thank You.

    ]]>

  32. Anonymous says:

    < ![CDATA[

    TrianguloY  How would this script have to be modified if I wanted the sidebars to be smaller? For instance, I like the parallax effect, but I’m thinking of having my sidebar only occupy a third of my screen when open.

    ]]>

  33. Anonymous says:

    < ![CDATA[

    Hmm, try changing the ‘amount’ parameter.


    If that doesn’t work perhaps a better script is needed (so ask with more exact details what you want, if possible)

    ]]>

  34. Anonymous says:

    < ![CDATA[

    Can’t you just use an appropriate sized sidebar with stop point and no modification to script?

    ]]>

  35. Anonymous says:

    < ![CDATA[

    Yeah. I was able to make the original script work.

    ]]>

  36. Anonymous says:

    < ![CDATA[

    Video doesn’t exist 🙁

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *