2020-08-30 11:34 PM
This might be in your to-do list in the future already, but I would appreciate this type of feature a lot.
If I want to have dynamic text size fields at the moment, I must write relative positioning for the elements manually.
(aka. element1.setY(element2.getY() + element2.getHeight() + ELEMENT1_2_OFFSET))
Constraint layout features would enable to set position to elements based on other elements.
2020-08-31 08:09 AM
So you're saying you would like a sort of "anchor" for some elements on your view?
2020-08-31 10:41 PM
Yes, one element must be anchor, then other elements are positioned in relationship to it, based on its dynamic size and location.
This is common practise in Android UI edition for example:
https://www.youtube.com/watch?v=Ngz5cgLC7m4
I think this can be implemented in parts, and does not need to be full-blown android style editor.
For example simple dropdown selection like
"Relative positon to element: SELECT ELEMENT HERE"
"XY Offset: ENTER OFFSET HERE"
Would be sufficient. Then touchgfx just does the element1.setY(element2.getY() + element2.getHeight() + ELEMENT1_2_OFFSET)) under the hood.
This is useful when the element has dynamic size (e.g. text field), and you want to place object below, right or left of the element regardless of its size.
2020-09-01 02:22 AM
@Tuoman Thanks a lot for suggesting this.
Would you mind reposting your feature request to the Idea Zone. under the TouchGFX category?
This enables other interested parties in chipping in and voting for your request.
Thanks in advance.
2020-09-02 01:45 AM
You got it! Posted.