赞
踩
- <?xml version="1.0" encoding="UTF-8"?>
- <LinearLayout
- android:id="@+id/loginRoot"
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:background="@drawable/welcome">
-
-
- </LinearLayout>
- package com.example.uidesgin;
-
- import android.app.Activity;
- import android.app.Dialog;
- import android.content.Intent;
- import android.os.Bundle;
- import android.os.Handler;
- import android.view.Window;
-
- public class ActSplashScreen extends Activity {
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- // TODO Auto-generated method stub
- super.onCreate(savedInstanceState);
- // 去掉标题
- requestWindowFeature(Window.FEATURE_NO_TITLE);
- setContentView(R.layout.actsplashscreen);
- // 闪屏核心代码
- new Handler().postDelayed(new Runnable() {
-
- @Override
- public void run() {
- // TODO Auto-generated method stub
- Intent intent = new Intent(ActSplashScreen.this,
- MainActivity.class);
- // 从启动动画切换到主界面
- startActivity(intent);
- ActSplashScreen.this.finish();// 结束动画
- }
- }, 3000);
- }
-
- }
- <activity
- android:name="com.example.uidesgin.ActSplashScreen"
- android:configChanges="orientation|keyboardHidden|screenSize"
- android:label="@string/app_name"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
-
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。