Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9146

Re: How to Implement a Full Screen Button in View Header?

$
0
0

Here is what I do to implement a FullScreen button:

 

this._fullScreen = false;  this._oFullScreenButton = new sap.m.Button({  icon: "sap-icon://full-screen",  type: sap.m.ButtonType.Transparent,  press: jQuery.proxy(this.toggleFullScreen, this)  });
// Add the fullScreen toggle button to view custom header  this.getView().byId("pageS3").getCustomHeader().addContentRight(this._oFullScreenButton);
toggleFullScreen: function() {  if (this._fullScreen) {  this._closeFullScreen();  this._fullScreen = false;  } else {  this._openFullScreen();  this._fullScreen = true;  }  var sIcon = (this._fullScreen ? "sap-icon://exit-full-screen" : "sap-icon://full-screen");  this._oFullScreenButton.setIcon(sIcon);  },  _openFullScreen: function() {  var s2Controller = this.oApplicationFacade.getApplicationModel("sharedData").getData().s2Controller;  var masterPage = s2Controller.byId("page").getParent().getParent().$();  masterPage.css({  display: "none"  });  },  _closeFullScreen: function() {  var s2Controller = this.oApplicationFacade.getApplicationModel("sharedData").getData().s2Controller;  var masterPage = s2Controller.byId("page").getParent().getParent().$();  masterPage.css({  display: ""  });  },

Viewing all articles
Browse latest Browse all 9146

Trending Articles



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