public override void onInit() { oView = this.getView(); oView.addStyleClass(this.getOwnerComponent <Component>().getContentDensityClass()); // if the app starts on desktop devices with small or medium screen size, collapses the side navigation if (Device.resize.width <= 1024) { this.onSideNavButtonPress(); } Device.media.attachHandler((sap.ui.Device.Media.MediaRangeChangeInfo oDevice) => { if ((oDevice.name == "Tablet" && this._bExpanded) || (oDevice.name == "Desktop")) { this.onSideNavButtonPress(); // set the _bExpanded to false on tablet devices // extending and collapsing of side navigation should be done when resizing from // desktop to tablet screen sizes) this._bExpanded = (oDevice.name == "Desktop"); } }); }
public HelloDialog(sap.ui.core.mvc.View oView) : base(oView) { this.oView = oView; }