//Handler跳转界面
import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;
import android.content.*;
public class appStart extends Activity
{
public void onCreate(Bundle savedInstanceState){
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.start);
new Handler().postDelayed(new Runnable() {
public void run() {
/* Create an Intent that will start the Main WordPress Activity. */
Intent mainIntent = new Intent(appStart.this, MainActivity.class);
appStart.this.startActivity(mainIntent);
appStart.this.finish();
}
}, 2000); //2900 for release
}
}
/*注册Activity
把新建的启动界面作为首要开启的Activity*/
<activity
android:label="@string/app_name"
android:name="appStart" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity"/>
</application>
import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;
import android.content.*;
public class appStart extends Activity
{
public void onCreate(Bundle savedInstanceState){
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.start);
new Handler().postDelayed(new Runnable() {
public void run() {
/* Create an Intent that will start the Main WordPress Activity. */
Intent mainIntent = new Intent(appStart.this, MainActivity.class);
appStart.this.startActivity(mainIntent);
appStart.this.finish();
}
}, 2000); //2900 for release
}
}
/*注册Activity
把新建的启动界面作为首要开启的Activity*/
<activity
android:label="@string/app_name"
android:name="appStart" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity"/>
</application>