我在飞溅屏幕显示后显示Worklight主页时遇到问题。 (有关信息,我的应用程序之前运行良好)。
在res / drawable(s)文件夹中添加了很多spashscreen.png文件之后,我更新了.java主页类中的java代码:
super.setIntegerProperty("splashscreen", R.drawable.splashscreen);
super.loadUrl(getWebMainFilePath(), 5000);
然后我在.html主页中添加了以下内容:
<script type="text/javascript">
$(document).ready(function(){
// hide splash-screen
navigator.spashscreen.hide();
}
</script>
启动画面显示良好,5秒后,屏幕变黑。
以下是我的htc设备的错误日志:
03-08 16:08:08.354: E/libEGL(2722): call to OpenGL ES API with no current context (logged once per thread)
03-08 16:08:08.354: E/SurfaceTexture(1446): [SurfaceView] abandon: surfaceTexture(0x0x9df580) has been abandoned!
03-08 16:08:08.724: E/SurfaceTexture(1446): [Starting com.Maquette] abandon: SurfaceTexture(0x0xa1ca18) has been abandoned!
03-08 16:08:08.744: E/SurfaceTexture(1446): [com.htc.launcher/com.htc.launcher.Launcher] abandon: SurfaceTexture(0x0xa5ce18) has been abandoned!
03-08 16:08:13.068: E/SurfaceTexture(1446): [com.Maquette/com.Maquette.Maquette] abandon: SurfaceTexture(0x0x9df580) has been abandoned!
Thanx帮忙。
答案 0 :(得分:1)
您可能想通过@ user2124658尝试此主题中给出的答案:Worklight App Splash Screen on Android
如果您使用的是Worklight 5.0.5.x,请尝试以下操作:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl(getWebMainFilePath()); // yes, this is an extra invocation
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl(getWebMainFilePath(), 5000);
}
如果您使用的是Worklight 5.0.6.x,请尝试以下操作:
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.bindBrowser(appView);
super.loadUrl(getWebMainFilePath(), 5000);
}