帮助高度赞赏,
谢谢,
VKS.
对于PhoneGap:
public class MyDefaultActivity extends Activity { public voID onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("splashscreen",R.drawable.splash); // displays the splash screen for androID super.loadUrl("file:///androID_asset/www/index.HTML",3000); // Second parameter is duration for delay of splash screen }}
对于AndroID Native应用程序:
public class MySplashScreen extends Activity { private CountDownTimer lTimer; public voID onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestwindowFeature(Window.FEATURE_NO_Title); setContentVIEw(R.layout.splashscreen); // Contains only an linearLayout with backround as image drawable lTimer = new CountDownTimer(5000,1000) { public voID onFinish() { closeScreen(); } @OverrIDe public voID onTick(long millisUntilFinished) { // Todo auto-generated method stub } }.start(); } private voID closeScreen() { Intent lintent = new Intent(); lintent.setClass(this,MyLauncherActivity.class); startActivity(lintent); finish(); }}
确保一个名为splash.png的文件作为res / drawable-hdpi / splash.png(RGBA)存在.
总结以上是内存溢出为你收集整理的如何添加应用程序预装载/启动屏幕/飞溅屏幕到我的PhoneGap Android应用程序全部内容,希望文章能够帮你解决如何添加应用程序预装载/启动屏幕/飞溅屏幕到我的PhoneGap Android应用程序所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)