Skip to Content
0
Apr 09, 2015 at 09:08 AM

Move login dialog to the Middle of the screen?

835 Views

Hi ..

i want to move the login dialog to the middle of the screen.. (the app has to run both on mobile and desktop, so the dialog should come in the middle)

i have used sap.m.

code snippet:

var ologinBar = new sap.m.Bar({

contentMiddle : [ new sap.m.Button({

text : "Login",

width : "200px",

press : [ oController.loginPress, oController ]

}), ]

});

var oList = new sap.m.List({

items : [ new sap.m.InputListItem({

label : "Username",

content : new sap.m.Input({

placeholder:"Enter User name",

value : "{app2>/Username}"

})

}), new sap.m.InputListItem({

label : "Password",

content : new sap.m.Input({

placeholder:"Enter Password",

value : "{app2>/Password}",

type : sap.m.InputType.Password

})

}) ]

});

var oDialog = new sap.m.Dialog({

id : "idDialog", // sap.ui.core.ID

// icon : undefined, // sap.ui.core.URI

title : "Authentication", // string

showHeader : true, // boolean, since 1.15.1

stretchOnPhone : true, // boolean, since 1.11.2

stretch : false, // boolean, since 1.13.1

justifyContent : sap.m.FlexJustifyContent.Center,

content : [ oList, ologinBar ], // sap.ui.core.Control

});

Topic was edited by: Michael Appleby

Attachments

Capture.JPG (21.3 kB)