v10.5b4

v10.5b4

This fourth iteration brings improvements and fixes to the features introduced at the beginning of this beta cycle.

It also contains an experimental Zooper widget scaling when loading templates, thanks to Lutz Linke . This scaling should help in loading themes accross any screen, by adjusting the widget size to fit the target screen. This hack is experimental: tested successfully with 4 devices, but it need some more testing to be declared reliable.

Changelog:

– experimental Zooper widget scaling when loading templates

– add LL.pickColor, LL.pickNumericValue and LL.pickImage functions

– add LL.startActivityForResult, useful to access other apps services, such as file picking, or sharing

– Container.getItemByLabel will also return items for which name is not set and label matches

– new set/getTag methods with support for an identifier

– fix the title of the item name dialog

]]>

15 Commentsto v10.5b4

  1. Anonymous says:

    < ![CDATA[

    Pierre Hébert Happy to give the Zooper scaling a go on my Nexus 7. Is there a standard test/template?

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Yes, here: https://plus.google.com/u/0/106201536507820539535/posts/gstzd6C2dGS.


    But this is not a real life template. I don’t know how representative of the existing themes the test template is. Maybe the best test would be to load existing themes and see how it goes on various devices.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    No, only a way to pick a color using the current dialog box and return the value to the script

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Pierre Hébert Tried on my tablet, scaling ZWs works GREAT. Due to memory some didn’t loaded, some were only scaled properly after LL restart at first. But at second try all worked immediately. Thanks Pierre, you’re a genius. So what was my mistake?

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Pierre Hébert Jappie Toutenhoofd Copied current state of my template to the preview Box I sent you. My tests are limited, resolutions don’t differ much, but still I’m quite satisfied with the results I got.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Lutz Linke Pierre Hébert Loaded the N7 template from the post. Everything loaded and scaled perfectly. Will try another template later as suggested. Can post screenshot if needed.

    ]]>

  7. Anonymous says:

    < ![CDATA[

    The pick methods are just predefined ones using startActivityForResult, am I right?

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Tony Merrell-Jones and others:


    From my post Pierre referenced above, please with 10.5b4 only try the Nexus 4 720×1280 one. The others were patched by me, the N4 is unpatched.

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Lutz Linke good to hear! In the end, formulas are:


    preset_widgetwidth = preset_widgetwidth*ratio_width



    preset_widgetheight = preset_widgetheight*ratio_height



    pref_widget_scale = pref_widget_scale*Math.min(ratio_width, ratio_height)/ratio_dpi)



    preset_dpiwidth and preset_dpiheight are left untouched. This makes sense if dpi stands for device independent.



    All values need to be rounded to integers. I had a nasty bug where the scale was stored as a floating point but zooper refused to use this floating value and reverted it to 100 🙁 This explained some inconsistencies. Sometimes the computed value was by chance an integer, sometimes not, lol !




    Lukas Morawietz pickColor and pickNumericValue are direct calls of the dialog built into LLX, while pickImage is indeed a startActivityForResult, but with a special behavior (it will not interrupt the script because the launched activity lives in the same app and the context cannot be lost for this reason).

    ]]>

  10. Anonymous says:

    < ![CDATA[

    Pierre Hébert Thanks. From my tests I thought factor for pref_widget_scale depended on widget’s ratio (preset_widgetwidth > preset_widgetheight ? ratio_height : ratio_width).



    Leaving preset_dpiwidth/height untouched, now thinking about it, makes pretty sense!!! The widget’s “physical” preset_widgetwidth/height changes when loaded on device with different resolution. Adjusting those and modifying pref_widget_scale to compensate for the resolution change should lead to exact the same “virtual” preset_dpiwidth/height — and that’s what we want/need! So dumb of me not thinking about this earlier 🙁

    ]]>

  11. Anonymous says:

    < ![CDATA[

    “LL.pickColor” according to API doc (and as tried in script) is “LL.pickcolor” without camel-case. Will you change the casing? Or is it save to use the method’s name as-is?

    ]]>

  12. Anonymous says:

    < ![CDATA[

    This should be camel cased, thanks for the info. This is the problem of auto completion, you don’t notice typos anymore 😉


    By the way the next version will also be incompatible on pickColor and pickNumericValue because they will include a “title” parameter as their first argument.

    ]]>

  13. Anonymous says:

    < ![CDATA[

    Pierre Hébert That’d’ve been my next request: title for dialog 😉 When?

    ]]>

  14. Anonymous says:

    < ![CDATA[

    Next update soon. Maybe as a release if nothing prevents it in the current beta.

    ]]>

  15. Anonymous says:

    < ![CDATA[

    Would be great since I’m preparing my template release and want the color picker included 🙂

    ]]>

Leave a Reply

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