Search code examples
sapui5ui5-tooling

Is it possible to center a control(GenericTile) in the middle of the screen in View.xml without using css?


im new to ui5 so i apologize if my question is too easy. i have a Generatic Tile that supposed to display events from Odata v4. the problem i have is that this tile is required to be in the middle of the screen(knowing that there is nothing else around). i tried using FlexBox(and many other classes) and i was only able to center it, but not to get it in the middle of the screen. is it possible to do it using only my View.xml?

enter image description here


Solution

  • Maybe try to wrap your Tile with a VerticalLayout or VBox (which extends FlexBox) and set height='100%' justifyContent ='Center' Something like:

    How to vertically center align my form container in openui5

    or this:

    https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.FlexBox/sample/sap.m.sample.FlexBoxBasicAlignment

    Kind regards Sebastian