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.
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: ""
});
},
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 | |
| 4 | |
| 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.