I have a layout element with an text element inside, the layout has a fixed height, i’m trying to align it vertically and horizontally, if a set the properties align=“center” and valign=“middle” it is centered only horizontally (valign is ignored), i even tryied with align =“middle” and it was centered vertically , but oviously not horizontally, Is there any solution to align it vertically and horizontally?
It is not supported currently, to align element horizontally and vertically at the same time
You can use spacer views to center the element, something like
rows:[
{ gravity:1 },
{ view:"text", align:"center", ... },
{ gravity:1 }
]
as result text view will be centered vertically