TrianguloY
now browsing by tag
I consider this a bug, but perhaps someone is using this ‘feature’ so fixing it could break some little scripts.
When you run container.setPosition(X,Y,S, false) the container don’t stop scrolling.
This mean that if you scroll fast, even if you try to stop the scrolling with that command it will set the position but then it will start again to scroll. More technically the velocity of scrolling is not reset. Perhaps this also happen with true instead of false, I didn’t try.
Another suggestion could be a new function stopScrolling.
]]>Awesome, this is awesome.
Pierre Hébert: do you remember one of my old suggestions about launch an app with the ‘clear flag’, I mean to launch it as new instead of open again as from the recent menu.
Well, just launch this from the shortcut:
var i=LL.getEvent().getItem();
var nt= i.getIntent();
i.setIntent(nt.clone().addFlags( Intent().FLAG_ACTIVITY_CLEAR_TASK ));
i.launch();
i.setIntent(nt);
Awesome, we have almost full power from Intents :DDD {perhaps it’s too much but what about LL.launchIntent(Intent intent); ?}
]]>If you try to get the image ( item.getImage(); ) of an item with ‘display the icon’ set to false, the launcher shows…
I think it will be better to just return null.
]]>This is a script suggestion that I think it will be useful, but perhaps it’s not very easy.
How about a container.getDeltaPositionXY() (or different name) that will return how much the container scrolled in the script.
This will be useful mainly with the positionChange event, to avoid need to store manually and retrieve it from script to calculate it (which is not really a problem, but better implemented)
]]>Didn’t I reported this before? I don’t remember, sorry if it was, but the bug is there so I guess it’s ok.
When setting the position of an item (and I think other parameters as scale, but I didn’t test) you should check if the parameters are valid. It’s the third time all my items disappear 😛 (killing the launcher make them reappear)
To reproduce this just set the position of an item to ‘Math.random’, which is different from Math.random() {and probably other things, such as setPosition([0,0],0); }
LL.getEvent().getItem().setPosition(Math.random,0);
I know this is not exactly a bug from the app, just an unexpected behavior when the input is not expected. But I think a check is not something really difficult.
]]>Suggestions for the new icon picker:
I apologize that I did’t suggested this before, in the beta, but I didn’t need to use the new icon picker until now.
First: Personally I only need to change an icon when I make a custom shortcut ( with a script or whatever) and so I need to choose the icon of an app. Previously I always used your beta app ‘App icon picker’ but unfortunately it doesn’t work now.
This is a dual suggestion/solution, but of course you can implement both.
A way will be a custom button when selecting icon packs to launch the original intent of the icon pack (perhaps other packs as yours don’t have internally the icons, or they let you modify it/whatever) [if this is implemented somewhere, please tell me 🙂 ]
Another way will be a new option ‘app icon’ or perhaps add the icon as the first item when selecting ‘application’ and choosing the app you want.
WAIT: before you say anything I want to add that I know that the icon is there in the ‘application’ option, with the name ‘icon’, but when I choose it the quality is low, very low. That didn’t happen with the previously mentioned method.
This made me think in the second suggestion: As you said a lot of times, the size of the icon is selected based on the size of the item and similar. But how difficult will be to choose the size with the new icon picker? Perhaps with custom size or just with ‘original’/ ‘recommended’/’low’ (original icon, the current behaviour, and a low icon respectively).
And just to finish, the third suggestion is just something to help and easy to do. When you choose the ‘launcher images’ option, there is a list of all containers…with the id. Why don’t write their name/type? The same change as you did when the shortcut to folder option ( from id to name, but now if possible also type).
Oh and perhaps as another suggestion, but not important, some little arrows to pass between the options, specially useful with the launcher images.
As usual, only suggestions.
]]>I didn’t have played yet with the new icon picker, but now that I did the ‘X’ button to remove the current picture…
Is this a personal bug? It’s a bit strange nobody reported it before.
I’m in the latest stable version
]]>Save layout
Save layout
So, I’m fully back again…and with a new script!
This is something I started time ago, and I have been improving it adding rotation, custom velocity, and more. Now it’s time to publish it, but of course you can suggest improvements.
This script is something visually beautiful, perhaps a bit slow with too much items, but even I am impress with the final result. It saves the position, size, scale and rotation of the items in free mode, and restore them when launched moving them smoothly (more or less).
I’m good at scripting, but no so good at creating layouts. If you are one of the masters that creates awesome layouts I let you create one with this script, that would be awesome.
It is more than just some lines of code, so I wrote a description after the config. If you want to share a layout with the script the only thing I ask you is to leave those comments. You can modify it if you want (and know).
Instructions:
The script will save the data of the items in the tag of the item/container.
How to move the items: just launch the script from the item with the data (click, swipe…) or even from a container (tap, long tap…)
How to save the data: Launch the script from the scripts menu (LL pop-up –> scripts) and choose the velocity (the first time you can simply just executing normally).
Characteristics:
If the item have a different tag it will ask before save.
Items in grid mode won’t be saved, and also won’t be moved even if they were saved while in free mode.
Rotation works from the center of the item (something obvious, but not script-side)
Debug mode to see if an item is stuck in the animation.
When the launcher lost focus, items are automatically moved to the final position and the script finishes.
If you start a different instance of the script while another one is running, the previous one stops automatically.
Problems:
Items with skew can behave wrong.
———————-
The script is in the first comment. Just click it and copy all.
Tell me if you prefer this way.
]]>I know you want now to focus on bugs, but you can still add this to the to-do list for the future (in case it is not…
We can add shadows to the labels…what about add also shadows to the icons? Perhaps you can use the holo selection effect to make them.
Well just a suggestion.
]]>Challenge
Challenge
Let’s wake up a bit this community with a challenge open to everyone (no prize sorry). This is a mathematical challenge to make a script, however you can also try if you don’t know scripting, just tell the steps or write the formulas.
This task is something I’ve been thinking for a lot myself, but I couldn’t get the right answer until now. This is the challenge in case you want to try, not very difficult, easy when you find the answer, but really tricky specially if you take the wrong way (and I took a lot of wrong ways 😛 )
As you probably know, you can get geometry data from items: size, scale, (skew), rotation and position.
However the position you get is the one of the top left corner of the minimum box surrounding it.
What if you want to know the center of the object?
(Note: let’s assume skewX=skewY=0 to avoid that strange parameter)
Task: Write a function with:
Input: an item (or their geometry data as said before)
Output: a vector [x,y] with the position of the center of the object.
You can use the Math functions (cos, sin, tan, acos, asin, atan, abs, sqrt, pow, … )
The video shows how it should behave in action. The cross item is the input, the circle is the output.
(About the ending part: all questions will be answered at the end of the month)
Submit your answers here in comments. You won’t win anything sorry, just the fact of solving this tricky challenge 🙂 I’ll publish my own solution when necessary, I expect to do it in one week or less. I want first to see others.
Also, keep in mind that this is really useful, it doesn’t only tell you the center, also the size of the whole item. Perhaps in the future Pierre will be able to implement the getBoundingBox in items, but from now we have this.
If you found this too easy, this is an extra variation (that I personally couldn’t resolve, so I can’t provide the right answer): modify it to work with skew too.
]]>
D5 Creation