I’m trying to make a page indicator by script, with a red color on the good page indic but I don’t know how to do,…

I’m trying to make a page indicator by script, with a red color on the good page indic but I don’t know how to do, to know on which page I am… And I don’t know where to begin… The scripts on the wiki are too basics..

Thanks for your help!

]]>

2 Commentsto I’m trying to make a page indicator by script, with a red color on the good page indic but I don’t know how to do,…

  1. Anonymous says:

    < ![CDATA[

    They might be basic, but the great thing is that the key components are clearly visible.


    To get the current page X and Y, try this:



    var d=LL.getCurrentDesktop();


    var page=Math.round(d.getPositionX()/d.getWidth());



    The rest is up to you, it depends on the way you want to display things.


    To display a red dot, you could either use a combination of 2 shortcuts, a fixed font, one with a red font color, the other with a white one (red above). Set their labels to a sequence of white dots, and the other one with a single dot with some spaces around (to move it right/left), according to the current page. A bit like in http://www.pierrox.net/android/applications/lightning_launcher/wiki/doku.php?id=script_minimalistic_page_indicator


    You could also directly draw some filled circles  using the canvas.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Thanks, I’ll try in the next days !

    ]]>

Leave a Reply

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