1. Copy a picture to the drawable-mdpi directory of the Res directory of the Android project
2. Write code in the Java file under the main src
PackageCom.study.hellomobileword1;ImportAndroid.os.Bundle;//import android.app.Activity;ImportAndroid.view.Menu;ImportOrg.apache.cordova.*; Public classMainactivityextendsdroidgap{@Override Public voidonCreate (Bundle savedinstancestate) {Super. OnCreate (savedinstancestate); //set a background picture Super. Setintegerproperty ("SplashScreen", R.DRAWABLE.SPLASH_SN); //set timeout Android app if 6 seconds is not reflected it is considered a timeout can be set manually, here 60 seconds to timeout Super. Setintegerproperty ("Loadurltimeoutvalue", 60000); //The first parameter represents the page that the software initializes, and the second parameter indicates the time that the background picture is displayed (the time millisecond value) Super. Loadurl ("file:///android_asset/www/index.html", 1000); } @Override Public BooleanOncreateoptionsmenu (Menu menu) {//inflate the menu; This adds items to the action bar if it is present.getmenuinflater (). Inflate (R.menu.main, menu); return true; }}
PhoneGap Start Background settings