App Drawer in any Container

App Drawer in any Container

Thousand times requested, finally possible!

Use any container as an App Drawer.

And the best: it’s faster than the original drawer

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

http://www.pierrox.net/android/applications/lightning_launcher/wiki/doku.php?id=script_app_drawer&#issues_and_hints
]]>

61 Commentsto App Drawer in any Container

  1. Anonymous says:

    < ![CDATA[

    I like the idea but I will not use it. I like my apps hidden in the app drawer, hard to reach. Anything worth reaching fast should be on the desktop.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Bogdan Tautu me 2. But I know many people asked for it, and it’s not too hard to script, so I did it.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Hey guys could someone please explain step by step in laymen terms how to apply a script from the many scripts avaikable, I feel dumb for asking, I just don’t know how, I’m a complete novice, lol.also is there a script that mimics touchwiz page scrolling.thanks in advance

    ]]>

  4. Anonymous says:

    < ![CDATA[

    All Apps -> Script editor -> new -> copy/paste code there -> long press the name above -> enter a useful name -> if there is a config section at the beginning of the script you can put there other than the standard values (replace numbers with numbers, true/false, strings are something like “sth” you can put there anything you want, care for the explanations given in the comments [after //])



    Navigate in the settings to the events & actions tab (either general, container or item, depends on the script) -> choose the given event (if more than one, do them one by one) -> Run script -> choose the before copied script (short tapping the name of the current displayed script opens the list of scripts) -> to confirm press back until you are again in events & actions tab



    Questions left? Ask!

    ]]>

  5. Anonymous says:

    < ![CDATA[

    link wont load to even look it up

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Yep. Pierre Hébert I think your site is down

    ]]>

  7. Anonymous says:

    < ![CDATA[

    dont tell me you closed your laptop again Pierre Hébert hahaha

    ]]>

  8. Anonymous says:

    < ![CDATA[

    its been down for 11 hours.

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Lukas Morawietz thank you, exactly what I needed bro

    ]]>

  10. Anonymous says:

    < ![CDATA[

    Kernel panic…

    ]]>

  11. Anonymous says:

    < ![CDATA[

    Pierre Hébert to what are you referring?

    ]]>

  12. Anonymous says:

    < ![CDATA[

    The server was crashed, result of a kernel panic error 🙁

    ]]>

  13. Anonymous says:

    < ![CDATA[

    update: ability to sort horizontally, like the stock kitkat Drawer

    ]]>

  14. Anonymous says:

    < ![CDATA[

    How do I use this script specifically? The site says on resume but it still doesn’t show up. Do I need to restart the launcher or something?

    ]]>

  15. Anonymous says:

    < ![CDATA[

    good question i waited 2 days

    ]]>

  16. Anonymous says:

    < ![CDATA[

    bahrta sai uhm, are you on latest beta? The Apps should show up when the container first gets focused after setting the script to resume event

    ]]>

  17. Anonymous says:

    < ![CDATA[

    Lukas Morawietz I’m on version 10.2.1 from the play store. Do I need to update for it to work? I don’t always update right away because since it’s copy protected I can’t roll back if an update is buggy.

    ]]>

  18. Anonymous says:

    < ![CDATA[

    bahrta sai this script uses container.addShortcut, and get/setIntent so you need at least 10.4b2


    Or you wait for the next stable release 

    ]]>

  19. Anonymous says:

    < ![CDATA[

    Lukas Morawietz i am running latest and it hasnt worked for me either. its been 3 days total.

    ]]>

  20. Anonymous says:

    < ![CDATA[

    Waiting days won’t make it work…



    Does it just nothing?


    In which kind of container are you using it?


    Are you running latest beta or stable?

    ]]>

  21. Anonymous says:

    < ![CDATA[

    at the time i was running 10.4b2. i tried panel and folder. im hoping i dont have to use the main desktop.

    ]]>

  22. Anonymous says:

    < ![CDATA[

    You don’t have to use a desktop.


    However I am on 10.4b3 and there is another bug, which makes it impossible for me to test anything related to this script.

    ]]>

  23. Anonymous says:

    < ![CDATA[

    i just did the update 40min ago.

    ]]>

  24. Anonymous says:

    < ![CDATA[

    Curtis Sylvester Jr. Now in latest version it’s working again. But don’t use autofill (0) for config values.



    Have you disabled script execution?


    Have you hidden icons in original app drawer?


    Again: does it just nothing?

    ]]>

  25. Anonymous says:

    < ![CDATA[

    i recopied the script…. it lagged my tablet hard but worked for about 4x but now its showing an error. yes i hid a few apps and removed a few from the (new) app drawer too. these are apps i do not want in my panel at all. but i have been getting an error since

    ]]>

  26. Anonymous says:

    < ![CDATA[

    It’s not prepared for someone deleting the items, that has to be implemented first.


    Also I didn’t asked for hidden apps, but for hidden icons…



    I see that may be useful, I’ll implement a fix soon.

    ]]>

  27. Anonymous says:

    < ![CDATA[

    the items i didn not delete, just the shortcuts from the panel. the apps i put into hiding. the worse i did was rename the script so i knew what i was looking for when i set it up. its worked 4x but then it created that error and now it wont shut up even after i disable it Pierre Hébert.

    ]]>

  28. Anonymous says:

    < ![CDATA[

    A shortcut is an item. Renaming the script should do nothing.



    What you can do is load my MulitTool, and then use it to delete all items in the panel and reset the Tag. That should put everything back to start.

    ]]>

  29. Anonymous says:

    < ![CDATA[

    it worked… now i just leave everything alone right? at least until theres a way to remove them without breaking the script.

    ]]>

  30. Anonymous says:

    < ![CDATA[

    Yes. I hope I have time for it tomorrow.

    ]]>

  31. Anonymous says:

    < ![CDATA[

    Done. See in the wiki how it’s done exactly and what you have to do to hide apps

    ]]>

  32. Anonymous says:

    < ![CDATA[

    ok looking it up now

    ]]>

  33. Anonymous says:

    < ![CDATA[

    is it the same script or different?

    ]]>

  34. Anonymous says:

    < ![CDATA[

    Different. Actually it has a lot of new code and some changes in the old…

    ]]>

  35. Anonymous says:

    < ![CDATA[

    ok so recopy/paste script got it thanks

    ]]>

  36. Anonymous says:

    < ![CDATA[

    works even better and no need to open the actual drawer since the script does the job from the menus (tested).

    ]]>

  37. Anonymous says:

    < ![CDATA[

    I keep getting this error:



    At line 175: TypeError: Cannot find function save in object net.pierrox.lightning_launcher.c.a.i@656f8fa0



    I’ve hunted through the script looking for this and just can’t seem to find it. Any help?

    ]]>

  38. Anonymous says:

    < ![CDATA[

    Brian King update to latest beta?

    ]]>

  39. Anonymous says:

    < ![CDATA[

    Is it needed? I must have missed that. I’m running latest stable release.

    ]]>

  40. Anonymous says:

    < ![CDATA[

    Yes it is needed, but possibly I forgot to say that somewhere

    ]]>

  41. Anonymous says:

    < ![CDATA[

    Ok. I got the newest beta. Now I keep getting “Database has not been created” error

    ]]>

  42. Anonymous says:

    < ![CDATA[

    Do not launch the script by a menu, but by an event

    ]]>

  43. Anonymous says:

    < ![CDATA[

    first thing you do is place that script where you want your apps to be. be sure that item menu is checked when you do. this so so you can delete an app shortcut without error. also have the the lightning menu checked as well. this way you can add that app shortcut back. the script itself will go in the resumed event of the container. once thats done just open the apps drawer wait about 4 seconds and then go back thats what i did.

    ]]>

  44. Anonymous says:

    < ![CDATA[

    Curtis Sylvester Jr. What did you put yours in? I made out work with a panel but when I used it with a folder, it kept freezing LLX

    ]]>

  45. Anonymous says:

    < ![CDATA[

    It works! Many thanks gentlemen 🙂

    ]]>

  46. Anonymous says:

    < ![CDATA[

    i put mine in a folder, a panel and on a desktop just to be a smart ass. then i used the fading page script to make it look nice. Lukas Morawietz an idea would be to have that on a swipe so we can swipe the pages if we wish.

    ]]>

  47. Anonymous says:

    < ![CDATA[

    That sounds like what I did. Mine is in a panel, inside a folder that opens on my desktop. Similar to the windows start menu

    ]]>

  48. Anonymous says:

    < ![CDATA[

    Curtis Sylvester Jr. You mean fading one page up/down?

    ]]>

  49. Anonymous says:

    < ![CDATA[

    Brian King weird… It should (and does for me) work in a folder

    ]]>

  50. Anonymous says:

    < ![CDATA[

    up/down or left/right. im the type that prefers swiping left/right.

    ]]>

  51. Anonymous says:

    < ![CDATA[

    I prefer tapping 😀 that’s why I use folders for my AppDrawer

    ]]>

  52. Anonymous says:

    < ![CDATA[

    lol to each their own but the fade effect works and if you want the effect if the wallpaper switching just put a background in a panel.

    ]]>

  53. Anonymous says:

    < ![CDATA[

    Curtis Sylvester Jr. Try this one. You have to put in config section the id of your container. This is extremely basic: it ignores the bounding box.



    Pierre Hébert why do the swipe events not contain a container? 

    ]]>

  54. Anonymous says:

    < ![CDATA[

    //config


    var speed=50;//lower is faster, 1 for instant, 255 for slowest


    var containerID=2;//only needed if using swipe


    //endconfig




    var e=LL.getEvent();


    var c=e.getContainer()


    if(c.getId()==-1)c=LL.getContainerById(containerID);


    var i=e.getItem()||c.getItemById(parseInt(LL.getScriptTag()));


    var s=e.getSource();


    if(s!=”SHORTCUT”&&s.slice(0,7)!=”C_SWIPE”)


    {


    if(i!=null)


    {


    i.setTag(JSON.stringify([Math.round(c.getPositionX()/c.getWidth())*c.getWidth(),Math.round(c.getPositionY()/c.getHeight())*c.getHeight()]));


    Android.makeNewToast(“Page saved.”,false).show();


    LL.setScriptTag(null);


    }


    else Android.makeNewToast(“Error: No shortcut selected.\nTap on the shortcut first.”,false).show();


    return;


    }


    if(s.slice(0,7)!=”C_SWIPE”&&i.getTag()==null)


    {


    LL.setScriptTag(i.getId());


    Android.makeNewToast(“Shortcut selected.\nNow launch the script from menu where you want the shortcut to point at”,false).show();


    return;


    }



    var dir=s.slice(8,s.length);


    var start=[Math.round(c.getPositionX()/c.getWidth())*c.getWidth(),Math.round(c.getPositionY()/c.getHeight())*c.getHeight()];


    var goTo=(dir==”DOWN”?[start[0],start[1]-c.getHeight()]:dir==”UP”?[start[0],start[1]+c.getHeight()]:dir==”LEFT”?[start[0]-c.getWidth(),start[1]]:dir==”RIGHT”?[start[0]+c.getWidth(),start[1]]:JSON.parse(i.getTag()));


    c.setPosition(start[0],start[1]);


    if(goTo[0]==start[0]&&goTo[1]==start[1])return;


    var dwidth=c.getWidth();


    var dheight=c.getHeight();


    var page0=[];


    var page1=[];


    var counter=[0,0];


    var items=c.getItems();


    var zorder=items.length;


    for(a=0;a


    {


    var item=items.getAt(a);


    var pin=item.getProperties().getString(“i.pinMode”);


    if(pin==”NONE”||(goTo[0]!=start[0]&&pin==”Y”)||(goTo[1]!=start[1]&&pin==”X”))


    {


    var x=item.getPositionX();


    var y=item.getPositionY();


    if(x>=start[0]&&x=start[1]&&y


    {


    page0[counter[0]]=item;


    counter[0]++;


    zorder=Math.min(zorder,c.getItemZIndex(item.getId()));


    }


    else if(x>=goTo[0]&&x=goTo[1]&&y


    {


    page1[counter[1]]=item;


    counter[1]++;


    }


    }


    }


    page0.length=counter[0];


    page1.length=counter[1];


    for(a=0;a


    {


    var item=page1[a];


    var x=(item.getPositionX()%dwidth+dwidth)%dwidth;


    var y=((item.getPositionY()%dheight+dheight)%dheight);


    item.getProperties().edit().setInteger(“i.alpha”,255).commit();


    if(item.getProperties().getBoolean(“i.onGrid”))


    {


    var cell=item.getCell();


    item.setCell(cell.getLeft()-Math.round((goTo[0]-start[0])/c.getCellWidth()),cell.getTop()-Math.round((goTo[1]-start[1])/c.getCellHeight()),cell.getRight()-Math.round((goTo[0]-start[0])/c.getCellWidth()),cell.getBottom()-Math.round((goTo[1]-start[1])/c.getCellHeight()));


    }


    else item.setPosition(start[0]+x,start[1]+y);


    if(c.getItemZIndex(item)>=zorder)c.setItemZIndex(item,0);


    }


    var diff=0;


    LL.writeToLogFile(page0+”\n”+page1,false);


    step();



    function step()


    {


    diff+=255/speed;


    if(diff<255)


    {


    for(a=0;a


    {


    var item=page1[a];


    item.getProperties().edit().setInteger(“i.alpha”,diff).commit();


    }


    for(a=0;a


    {


    var item=page0[a];


    item.getProperties().edit().setInteger(“i.alpha”,255-diff).commit();


    }


    setTimeout(step,0);


    }


    else


    {


    for(a=0;a


    {


    var item=page1[a];


    var x=(item.getPositionX()%dwidth+dwidth)%dwidth;


    var y=((item.getPositionY()%dheight+dheight)%dheight);


    item.getProperties().edit().setInteger(“i.alpha”,255).commit();



    if(item.getProperties().getBoolean(“i.onGrid”))


    {


    var cell=item.getCell();


    item.setCell(cell.getLeft()+Math.round((goTo[0]-start[0])/c.getCellWidth()),cell.getTop()+Math.round((goTo[1]-start[1])/c.getCellHeight()),cell.getRight()+Math.round((goTo[0]-start[0])/c.getCellWidth()),cell.getBottom()+Math.round((goTo[1]-start[1])/c.getCellHeight()));


    }


    else item.setPosition(goTo[0]+x,goTo[1]+y);


    }


    c.setPosition(goTo[0],goTo[1],1,false);


    for(a=0;a


    {


    var item=page0[a];


    item.getProperties().edit().setInteger(“i.alpha”,255).commit();


    }


    }


    }

    ]]>

  55. Anonymous says:

    < ![CDATA[

    where do i find the container id?

    ]]>

  56. Anonymous says:

    < ![CDATA[

    long press the desktop, and select items > hierarchy from the pop up menu. It lists all the items in that field. Item ID is the 6 digit number next to the label.



    You’ll have to add a “0x” in front of it when you put it in the script.

    ]]>

  57. Anonymous says:

    < ![CDATA[

    ok lets try this one… how do i find the id of the desktop itself?

    ]]>

  58. Anonymous says:

    < ![CDATA[

    E.g. with the MuliTool or run a script in the container with


    alert(LL.getEvent().getContainer().getId());


    If you get -1 you did something wrong

    ]]>

  59. Anonymous says:

    < ![CDATA[

    Lukas Morawietz because the swipe event is related to an item not a container

    ]]>

  60. Anonymous says:

    < ![CDATA[

    Pierre Hébert so what does this mean? i only gave an idea to choose how we go between pages now if we can see if it will work haha

    ]]>

  61. Anonymous says:

    < ![CDATA[

    Pierre Hébert No I mean the container swipe left/right/up/down

    ]]>

Leave a Reply

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