I have a Folder inside another Folder and want to use openFrom in order to apply an offset to X position.

I have a Folder inside another Folder and want to use openFrom in order to apply an offset to X position.

Can’t get the correct Y position, need help. Probably the X coordinate is also wrong but it works for my current layout.

What I use atm:

var y = item.getParent().translateIntoScreenCoordY( item.getCell().getTop() ) + item.getHeight() / 2;

What I want is to open the folder from the middle of the item.

This fails when I scroll the container.

]]>

9 Commentsto I have a Folder inside another Folder and want to use openFrom in order to apply an offset to X position.

  1. Anonymous says:

    < ![CDATA[

    I think all the coordinates functions are messed up ATM

    ]]>

  2. Anonymous says:

    < ![CDATA[

    This is true, but also you should multiply getTop() with getCellHeight() because the cell rect is in grid coordinates, not in pixels

    ]]>

  3. Anonymous says:

    < ![CDATA[

    translateIntoScreenCoordY recives an int as parameter this confused me.


    So instead of getTop() × getCellHeight() isn’t it better to get item.getPositionY()?


    I am getting more confused.

    ]]>

  4. Anonymous says:

    < ![CDATA[

    yes, this is because it is used elsewhere with rounded values, but maybe I can improve that

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Pierre Hébert ok, now it looks much better. Only one more question. When I use openFrom, is that the exact coordinate the animation starts from? I added 40 to the X coordinate and I think this is because of the padding from the folder but wanted to be sure.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    It should be the exact position on the screen, in pixels. Not sure about the effect of the padding ?

    ]]>

  7. Anonymous says:

    < ![CDATA[

    I’d like to share a video, know any free app for non-rooted android?

    ]]>

  8. Anonymous says:

    < ![CDATA[

    if running 4.4 you can use ddms, otherwise it is difficult, the best I found is to use an emulator on the PC and use a screen capture app…

    ]]>

  9. Anonymous says:

    < ![CDATA[

    yeah im looking for a no-root screen capture but they all say i need a pc. but i dont have access to that either so im SOL and POed

    ]]>

Leave a Reply

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