TrianguloY
now browsing by tag
I discovered a bug that I’m not sure if it is new of the beta, or it was before.
I discovered a bug that I’m not sure if it is new of the beta, or it was before.
It is related to the setPosition not being correctly set if you are scrolling. This makes that a script that change the position won’t work fine if you are scrolling when it executes, a big problem with the onChange event.
Explanation of the video:
As you can see there are three pages 1,2,3
At the bottom there is a shortcut to my fast run tool, used to run a script directly without the editor (evaluating it)
The script is a timeout that sets the position of the desktop to the second page after 3 seconds, this is used to be able to being scrolling when it executes.
If you just let it execute, it sets the position and everything is ok.
But if you are scrolling, the position is set, but then the container is shown in the same direction as you moved first. The video is a good way to understand it, but if you still don’t do: if you are in the page 0, you scroll to the left half page, and then the script sets the container in page one, you will see it in one and a half page.
Also, as you can see in the last tests, it is ‘moved to the finger’ only when you move the finger, not while it is stop.
Maybe you need to reset the ‘finger movement’ also when setting a new position, but not sure how this is done in android.
(Last note: the bug still persist if you use true as the last parameter in setPosition )
]]>dynamic calendar icon [fixed version]
dynamic calendar icon [fixed version]
Now with the ability to show the day or the month.
I posted time ago this script, but somebody asked for it, and with the new updates (and because it was wrong) I updated it.
The instructions are: (watch the video for better understanding)
– Change in the script the label of the item, by default it is ‘Calendar’
– By default it shows the day, change the ‘month’ variable to true to show the month
– Open the icon picker (just choose an icon of an item), then search for the item you want. If it support a dynamic calendar, you will find 31 icon, all the same but with different numbers. Just long press the one with the number 1 a toast will say that the data was copied. You can press back now to cancel.
– In the script, where it says, paste that data.
– Set the script in the resumed event of the container with the item.
It is now ready to use.
Note: if it don’t work, paste that data I mentioned here in a comment. Due to the long variety of icon packs I couldn’t test all.
Another note: it only updates the icon when the day/month change, if you want to force it (because you changed the icon or whatever) run the script from the item.
I hope it works, any error just comment.
]]>I recently tested with a template, and there are two ‘bugs’ that I think I found, but it’s strange nobody reported…
I exported a template from a nexus 4, and imported it on a galaxy tab. The screen resolution is very different and:
1) the template had a panel with a grid of: columns-fixed number-1, rows-fixed size-79. When I imported it, after the scaling lightning does, the panel still had columns-fixed number-1 (which is expected and right) but still rows-fixed size-79, which is not because this way if the screen is shorter less items are shown and vice versa.
2) the template had the desktop set to ‘portrait only’ but when I imported it the tablet was in landscape and after the importing it changed to portrait. I then realized that all items were wrong placed, and when I changed the setting and rotated it to landscape, it was ok. I guess that in the import screen the orientation matters, so maybe you may add a check of the template final orientation, or even a pop-up to let the user choose it (the final orientation) before apply.
And last, but maybe this is not so important, what about a setting to disable the scaling? When creating it, or when applying it. Maybe a screen is made to automatically adapt, and the scaling broke some configs (not sure about this last one suggestion, anyway I guess a backup does the trick, not tested)
]]>transparent bars lollipop
Strange things, but this seems to work.
Put this script to run in the load event of the desktop
LL.bindClass(“android.view.WindowManager”);
LL.getContext().getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
And, in the miscellaneous settings of the desktop, uncheck the transparent bars. Yes, you read right, I wrote that you need to disable the transparent bars in the lightning settings. (This is because that setting set those translucent bars, and the script won’t work)
For me it works. If it don’t work for you…I already said those are strange things.
]]>Always top indicator script
Always top indicator script
The first of the list of scripts from my new screen https://plus.google.com/105066926163073195690/posts/h2ABxYf2F5B (with template download link)
This is a script that places an item as an indicator always on top, that is replaced by the next one when reached.
This time I added annotations in the video (made with scripts, of course 😉 but to sum them here:
Instructions:
– Label the items “indicator 0”, “indicator 1”, and so on starting from top, otherwise it will behave wrong.
– Unzoom (or zoom) to move all the items to their positions. Use this specially when editing.
– Newly created items are prepared (tag saved and detached from grid) automatically. But
– To modify a previously saved one, run the script from the item (to save only that item), or from the container (to save all items, make sure all are in the right position)
Important note:
For me it works smooth and lag-free with 3,4 items. Didn’t tested with more but if it works slow for you, try to change the AUTOREFRESH to false, keeping in mind you will need to run the script after any change you make, even when adding new items.
]]>So
A lot of people have been complaining about the padding in widgets, something that seems to be an android issue, even thought other launchers seem to ‘fix’.
…
This is Lightning launcher! And we can also fix that!
The issue is that the widgets seem to have a margin (20px in my case), and suddenly I thought…why not set the margin of the box of the widgets to -20?
This is not possible with the normal lightning UI…but it is with scripts 😀
When setting the properties, lightning don’t check if they are positive, so you can simply put a negative margin to ‘reduce’ the widgets.
I quickly made this script that lets you easily ‘fix’ a widget running the script from the widget, or even all in a container running the script from the container (it lets you ‘revert back’)
Note: as I said, for me the ‘ghost’ margin is 20px in all directions, you can test and change those values in the script in case you have different ones.
Pierre Hébert: what about let the normal user set directly negative number in the box?
]]>For some reason I can’t edit the scripts names.
I remember that I could long clicking the name in the editor, but now (stock lollipop) long clicking the name opens the list to choose a script (that feature to select an item long pressing, moving, and releasing to confirm)
Anyone else?
]]>LL.getContext().getWindow().getDecorView().setSystemUiVisibility(4096+4+2);
Can you guess what it does 😉
(The effect will disappear when leaving the launcher, you may want to set it in the resumed event of the desktop, or any item. For android 4.4 or more. Didn’t test a lot)
]]>
D5 Creation