Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

Re: Regarding Mobile Application

$
0
0

Hi,

 

You need to make an app with pages:

 

create a page:

var page = sap.ui.view({id:"id", viewName:"viewname", type:sap.ui.core.mvc.ViewType.JS});

 

create a sap.m.App:

var app = new sap.m.App("App");

 

add your page to the app:

app.addPage(page)

 

add app to shell:

var shell = new sap.m.Shell("Shell",{showLogout : false});

shell.setApp(app).placeAt('body');

 

In your view there can be something like this in your return part:

 

return new sap.m.Page({

  title: "Map",

  content: [

     new sap.m.VBox({

       items: [

            new sap.m.Button("btn_showmap", {

            text : "Show Map",

            icon : 'sap-icon://map',

            width: "100%",

            press : oController.onShowMap

            }),

            new sap.ui.core.HTML({

                 content: '<div id="googleMap" style="width:300px;height:340px;margin-top: 10px;"></div>'

            })

       ]

      

     })

 

  ]

  });

 

 

 

In my example there is a vbox with a button, when you click on a button, you will see a google map. The google map is placed at the div I put to the page wit sap.ui.core.HTML.

 

I just showed some snippets of code, hope it is clear now.


Viewing all articles
Browse latest Browse all 8124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>