cancel
Showing results for 
Search instead for 
Did you mean: 

help for sap ui5 application

Former Member
0 Kudos

i want add space between two buttons, but the application is displyaing two buttons side by side. i want to display them in the centre of the page ui5.jpg

Accepted Solutions (0)

Answers (2)

Answers (2)

maheshpalavalli
Active Contributor
0 Kudos

Hi Shiva,

As per Fiori guidelines, it is better and recommended to put the buttons at the bottom of the page in footer bar or in the toolbar based on the requirement..

If you use any kind of footer bar and put the buttons inside, you will get space around the buttons automatically and if you use m.bar then you will get an aggregation 'contentmiddle', if you put any button in that aggregation, you will get the buttons in middle of the footer bar.

https://ui5.sap.com/#/api/sap.m.Bar

https://ui5.sap.com/#/sample/sap.m.sample.Page/preview

I would even recommend not to put those buttons in middle as it would look nice at the right side bottom.

BR,

Mahesh

himanshupensia
Participant
0 Kudos

Hi Shiva,

Try this.

<mvc:View controllerName="testing.controller.View1" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc"
displayBlock="true" xmlns="sap.m" xmlns:f="sap.ui.layout.form">
<App>
<pages>
<Page title="{i18n>title}">
<content>
<f:SimpleForm editable="false"
layout="ResponsiveGridLayout">
<HBox alignItems="Center" width="100%">

<VBox width="100%" alignItems="Center">
<HBox>
<Button text="button1"/>
<Button text="button2"/>
</HBox>
</VBox>
</HBox>
</f:SimpleForm>
</content>
</Page>
</pages>
</App>
</mvc:View>