on ‎2015 Jul 01 4:20 AM
In SAPUI5 demokit, I found there is a full screen button for chartContainer. Also in a explored example, the detail header has a full screen button as well.
I would like to implement such a full screen button in header of my detail view. But How to implement it?
thanks,
Yang
Request clarification before answering.
Hi,
I needed to implement the same toggle full screen button in my project, Maksim Rashchynski's answer helped me figure out a simpler way if anyone's interested:
button in XML view
<Button id="btnFullScreen" icon="sap-icon://full-screen" tooltip="Show in full screen mode" press="toggleFullScreen" />
function in controller
toggleFullScreen : function(oEvent) {
var id = oEvent.getSource().sId;
var cid = this.getView().byId(id);
var spapp = sap.ui.getCore().byId('appId');
if(spapp.getMode() == "ShowHideMode"){
spapp.setMode('HideMode');
cid.setIcon('sap-icon://exit-full-screen').setTooltip('Show in full screen mode');
}else{
spapp.setMode('ShowHideMode');
cid.setIcon('sap-icon://full-screen').setTooltip('Exit from full screen mode');
}
},
Ty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.