Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
305 views
in Technique[技术] by (71.8m points)

iphone - Cordova SAPUI5应用程序全屏iPhone X(Cordova SAPUI5 application fullscreen iPhone X)

I am trying to build an Cordova Hybrid application using the SAPUI5 framework, it all works fine but I just cannot get the app to run in fullscreen on an iPhone X and later.

(我正在尝试使用SAPUI5框架构建Cordova Hybrid应用程序,一切正常,但是我无法使该应用程序在iPhone X及更高版本上全屏运行。)

I know that there are plenty of topics online about this but all the solutions do not seem to work for an SAPUI5 application.

(我知道在线上有很多关于此的主题,但是所有解决方案似乎都不适用于SAPUI5应用程序。)

I added the viewport settings into my index.html and also switch to the new launch storyboard images.

(我将视口设置添加到index.html中,并且还切换到了新的启动情节提要图像。)

The splash screen does show full screen but then the app shows and it still has a white bar on top and on the bottom.

(初始屏幕确实显示全屏,但随后该应用程序显示,并且顶部和底部仍然有一个白色条。)

The app gets loaded through the following code:

(该应用通过以下代码加载:)

    <script>
        sap.ui.getCore().attachInit(function() {
            new sap.m.Shell({
                app: new sap.ui.core.ComponentContainer({
                    height : "100%",
                    name : "appBundleName"
                })
            }).placeAt("content");
        });
    </script>

body class="sapUiBody" id="content" style="background-color:#0854A0"

(正文class =“ sapUiBody” id =“ content” style =“ background-color:#0854A0”)

When I disable the script part the body's background color is shown in full screen of the (now empty) app.

(当我禁用脚本部分时,正文的背景颜色会在(现在为空)应用程序的全屏显示。)

However, when I enable the script parts (which enables the app) I have the two white bars back on top and bottom.

(但是,当我启用脚本部件(启用应用程序)时,我的顶部和底部有两个白条。)

So this makes me think that the app does run in fullscreen but that margins for the safe area is applied to prevent it from running under the nodge... Especially since I can set the following line inside Xcode in the viewDidLoad of the view controller and then the bars on top and bottom are red...

(因此,这使我认为该应用程序确实在全屏模式下运行,但是应用了安全区域的边距来防止它在nodge下运行。尤其是因为我可以在视图控制器的viewDidLoad中的Xcode中设置以下行,然后顶部和底部的条形为红色...)

self.view.backgroundColor = [UIColor redColor];

(self.view.backgroundColor = [UIColor redColor];)

So My question is if someone succeeded in creating an SAPUI5 Hybrid Cordova application running in fullscreen on an iPhone X and later?

(所以我的问题是,是否有人成功创建了在iPhone X及更高版本上全屏运行的SAPUI5 Hybrid Cordova应用程序?)

  ask by Nico van der Linden translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...