What determines whether or not the label of an item gets cut off with the “…” at the end?

What determines whether or not the label of an item gets cut off with the “…” at the end? This seems very buggy.. I’ll attach the bit of script as a comment

]]>

19 Commentsto What determines whether or not the label of an item gets cut off with the “…” at the end?

  1. Anonymous says:

    < ![CDATA[

    var cards=[


    [“c1″,””, 0,0×25,0x9b,0x24],


    [“c4″,”Games”, 255,0×25,0x9b,0x24],


    [“c2″,”Music”, 255,0xfb,0x8c,0x00],


    [“c3″,”Calculator”,255,0×00,0xbc,0xd4],


    [“c5″,”Art”, 255, 0, 0, 0]


    //,[“c6”,12,34,56,78]


    ];




    if(x>=0){


    $(0x8d0009).setLabel(cards[Math.round(x/w)][1]);


    }

    ]]>

  2. Anonymous says:

    < ![CDATA[

    I set the background so you can see how wide it is.. I’ll try giving it more lines

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Margin 4 on all sides so you can see the background.. Padding 0

    ]]>

  4. Anonymous says:

    < ![CDATA[

    The weirdest thing is that it’s not always cut off.. It doesn’t happen every time and its not always the same amount of letters that are cut off

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Try typical troubleshooting… Restart, rebuild,…


    Does it happen also for other texts, items, devices?

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Restarted SEVERAL times.. I’ve tried deleting the item and adding it again.. Haven’t tried copying to a new device yet but I will later today

    ]]>

  7. Anonymous says:

    < ![CDATA[

    I was having that … thing, but it was in the main settings. I would have something like this.



    G…ral


    Cur…t des…p



    If i went out of the settings then back in, it might be OK or it would be the same. It’s been fine since the 10.6.4 update, but it was … really annoying.

    ]]>

  8. Anonymous says:

    < ![CDATA[

    That sounds really strange.. I’m on 10.6.4 though

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Ren Shore  Just out of interest, are you using a Galaxy S4 ? I’ve got the same on S2 and i don’t get the …

    ]]>

  10. Anonymous says:

    < ![CDATA[

    Could you confirm that the background displayed on your screenshot is the “content” area, without border nor margin ? The text should fill the same area than this content area. I am wondering also whether text alignment changes something in this unwanted text truncation ?


    Another thing maybe: could it be that the length of the truncated text is the same as the previous text ?  Maybe there is a bug where the text wouldn’t be correctly “resized” after a value change, although that seems unlikely (at first sight).

    ]]>

  11. Anonymous says:

    < ![CDATA[

    Yes, the white background is the item that I’m changing the label..


    Yes it still truncates if its center aligned.


    I do think it’s related to the width of the previous text..



    If you want I can send you a backup?

    ]]>

  12. Anonymous says:

    < ![CDATA[

    Yes please, a backup can help a lot.

    ]]>

  13. Anonymous says:

    < ![CDATA[

    Pierre Hébert​ I sent you that backup.. Let me know if you find anything

    ]]>

  14. Anonymous says:

    < ![CDATA[

    Thanks, I can reproduce the issue. In my case Calculator is ok, but “Lightning Launcher” is not. And sometimes the bug propagates to other screens after a while, weird.



    Amazing setup by the way. A whole app inside the app, that’s an incredible work.

    ]]>

  15. Anonymous says:

    < ![CDATA[

    Yeah, it will be fine for a few swipes back and forth but eventually it will only print one letter..



    Also, thanks! I really appreciate that!

    ]]>

  16. Anonymous says:

    < ![CDATA[

    Well, I spent too many hours to understand and fix the problem, and now that I finally found the issue (which was a tricky one believe me), I discovered that fixing the bug would break a few existing scripts 🙁


    Fortunately I have a workaround but it may induce a small performance penalty. I will probably go for a round of beta testing for this fix.

    ]]>

  17. Anonymous says:

    < ![CDATA[

    What exactly was causing the issue? (If its not too difficult to explain)

    ]]>

  18. Anonymous says:

    < ![CDATA[

    It’s hardcore. I will sum up.



    On Android views positions and sizes are computed in two steps. First measure views (that is: how big a view would like to be), then, based on these sizes and the container rules, set their exact location and size.



    Inside the Android frameworks there are a couple of flags to manage the process and execute measurement and layout steps. Both steps are tightly linked and there are several ways to initiate a layout of the view hierarchy when something changes. In the end, if the measurement is done, the layout need to be done too otherwise bad things may happen.



    In Lightning, changing the text value requires a layout, for instance because the text can grow. But at some point the layout request is not processed anymore (the bug) and as a consequence the text view size is not updated to take into account the new value (and you see … because the value does not fit in the box).



    In some situation a position changed event is issued between the measurement step and the layout step. Through this event, a script is executed to change the label, which itself requests a layout. This has the border effect to alter some of the Android flags mentioned above in an unwanted way. (Sometimes only because this stuff is mostly asynchronous). The consequence is that layout is sometimes not done, but Android “thinks” it dit it already, and for this reason skip it. The text view keeps its old size, which might be too small for the new label.



    Well, I am not sure this explanation is very clear 🙁

    ]]>

  19. Anonymous says:

    < ![CDATA[

    I’d say the explanation was quite clear. I’m looking forward to new betas

    ]]>

Leave a Reply

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