android 模拟软件启动界面
package org.fireking;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class WelcomePanleActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
welcome() ;
}
protected void welcome() {
new Thread(){
@Override
public void run() {
try {
Thread.sleep(2500) ;
} catch (InterruptedException e) {
e.printStackTrace();
}
Intent intent = new Intent() ;
intent.setClass(WelcomePanleActivity.this, MainActivity.class) ;
WelcomePanleActivity.this.startActivity(intent) ;
}
}.start();
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="欢迎界面"
android:layout_gravity="center_horizontal"
/>
</LinearLayout>
更多相关文章
- Android(安卓)监听Fragment界面的点击事件
- Andoid - 开发实例(2): ViewPager卡片式界面2
- android用户界面之AlarmManager教程实例汇
- android界面xml文件中导入另一个xml文件的方法include
- android用户界面之TabHost教程实例汇总
- android用户界面之AlarmManager教程实例汇
- android 学习五 设置应用程序全屏(没有状态栏和标题栏)
- Android(安卓)Activity界面切换添加动画特效
- 一起学android之底部菜单TabHost的实现(9)