Hi guys,
I have a simple SplitApp with a master and setail pages.
Problem :-
The problem is that when i am trying to emulate my code on a device or when i put it on my nexus 4, it shows the master screen on the entire screen.
And on clicking on any of the list items, it opens that detail page but then the hamburger icon is gone and there si no way to get it back.
Can any one tell me the solution to properly using a splitApp such that it looks the same way on a device or on emulation as it does on the browser normally..??
Code :-
var list = new sap.m.List("test_list", { | |||||
//headerText: "Object List Items", | |||||
}); | |||||
var item1 = new sap.m.ObjectListItem({ | ||||
type: "Active", | ||||
title: "Right Now", | ||||
press: function() { | ||||
splitVar.toDetail("idtest111"); | ||||
splitVar.hideMaster(); | ||||
} | ||||
}); | ||||
list.addItem(item1); | ||||
var item2 = new sap.m.ObjectListItem({ | ||||
type: "Active", | ||||
title: "Schedule", | ||||
press: function() { | ||||
splitVar.toDetail("idtest222"); | ||||
splitVar.hideMaster(); | ||||
} | ||||
}); | ||||
list.addItem(item2); |
var item3 = new sap.m.ObjectListItem({ | ||||
type: "Active", | ||||
title: "About BFC", | ||||
press: function() { | ||||
splitVar.toDetail("idtest333"); | ||||
splitVar.hideMaster(); | ||||
} | ||||
}); | ||||
list.addItem(item3); |
var item4 = new sap.m.ObjectListItem({ | ||||
type: "Active", | ||||
title: "Fan Profile", | ||||
press: function() { | ||||
splitVar.toDetail("idtest444"); | ||||
splitVar.hideMaster(); | ||||
} | ||||
}); | ||||
list.addItem(item4); |
var rightNowPage = sap.ui.view({id:"idtest111", viewName:"res.view1", type:sap.ui.core.mvc.ViewType.JS}); | |||
var page2 = sap.ui.view({id:"idtest222", viewName:"res.view2", type:sap.ui.core.mvc.ViewType.JS}); | |||
var page3 = sap.ui.view({id:"idtest333", viewName:"res.view3", type:sap.ui.core.mvc.ViewType.JS}); | |||
var page4 = sap.ui.view({id:"idtest444", viewName:"res.view4", type:sap.ui.core.mvc.ViewType.JS}); | |||
var playerPage = new sap.ui.view("playerpage",{ viewName:"res.player", type:sap.ui.core.mvc.ViewType.JS}); | |||
var masterList = new sap.m.Page("masterpage", { | |||
title:"", | |||
class:"masterlist", | |||
content:list | |||
}); |
var splitVar = new sap.m.SplitApp("app1",{ | ||||
masterPages:[masterList], | ||||
detailPages:[rightNowPage,page2,page3,page4] | ||||
}); | ||||
splitVar.setMode(sap.m.SplitAppMode.ShowHideMode); | ||||
splitVar.setInitialDetail("idtest111"); | ||||
splitVar.setDefaultTransitionNameDetail("fade"); | ||||
splitVar.placeAt("content"); |