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.
]]>
< ![CDATA[
I think all the coordinates functions are messed up ATM
]]>
< ![CDATA[
This is true, but also you should multiply getTop() with getCellHeight() because the cell rect is in grid coordinates, not in pixels
]]>
< ![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.
]]>
< ![CDATA[
yes, this is because it is used elsewhere with rounded values, but maybe I can improve that
]]>
< ![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.
]]>
< ![CDATA[
It should be the exact position on the screen, in pixels. Not sure about the effect of the padding ?
]]>
< ![CDATA[
I’d like to share a video, know any free app for non-rooted android?
]]>
< ![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…
]]>
< ![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
]]>