IBM Worklight 6.1- How to reduce splash screen duration around 1 second for android?

ぐ巨炮叔叔 提交于 2020-01-25 08:47:11

问题


I'm using IBM Worklight 6.1 for my mobile app project. My question is how to reduce splash screen duration around 1 second. I and my colleague already try many solutions from stackoverflow regarding to this issue.

IBM Worklight 5.0.6 - How to add a splash screen to Android environment? - stay on splash screen

phonegap - splash screen for Android app - not working

Worklight App Splash Screen on Android - blank screen

Until now the splash screen takes a lot around 10 seconds. We test it on Samsung Note 2 and compile it using eclipse Juno.

This is our source code for splash screen.

package com.WorklightMobile;

import android.os.Bundle;

import com.worklight.androidgap.WLDroidGap;

public class WorklightMobile extends WLDroidGap {

    @Override
    public void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        super.setIntegerProperty("splashscreen", R.drawable.splash);
    }

    /**
     * onWLInitCompleted is called when the Worklight runtime framework initialization is complete
     */
    @Override
    public void onWLInitCompleted(Bundle savedInstanceState){
        super.loadUrl(getWebMainFilePath(), 1000);
        // Add custom initialization code after this line
    }

}

Check this out my repo - https://github.com/datomnurdin/worklight-mobile


回答1:


You cannot.
The current mechanism in Worklight 6.1.0 is remove the splash image on EnvInit.

What you can try to do is to remove the splash image Worklight uses (native\res\drawable\splash.9.png) and implement your own splash mechanism.



来源:https://stackoverflow.com/questions/21133152/ibm-worklight-6-1-how-to-reduce-splash-screen-duration-around-1-second-for-andr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!