接通过ImageView创建一个全屏的图片:

Android:简单的开场界面

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:orientation="vertical" >    <ImageView     android:layout_width="match_parent"    android:layout_height="match_parent"    android:src="@drawable/splash"    android:scaleType="center"    /></LinearLayout>

新建activity:

package com.example.testwelcome;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.os.Handler;import android.widget.Toast;public class WelcomeActivity extends Activity{    protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.welcome);        new Handler().postDelayed(new Runnable(){            @Override            public void run() {                // TODO Auto-generated method stub                Intent intent = new Intent(WelcomeActivity.this, MainActivity.class);                startActivity(intent);                WelcomeActivity.this.finish();                          }        }, 2000);//两秒后跳转到另一个页面           }}

AndroidManifest.xml

设置默认启动WelcomeActivity,并设置主题为全屏无标题样式

    <application        android:allowBackup="true"        android:icon="@drawable/ic_launcher"        android:label="@string/app_name"        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >        <activity            android:name="com.example.testwelcome.WelcomeActivity"            android:label="@string/app_name" >            <intent-filter>                <action android:name="android.intent.action.MAIN" />                <category android:name="android.intent.category.LAUNCHER" />            </intent-filter>        </activity>     <activity android:name="com.example.testwelcome.MainActivity"></activity>    </application>

>>实例下载

更多相关文章

  1. 【Android】Android中AlertDialog对话框的使用实例
  2. Android样式和主题(style&theme)
  3. Android HTTP实例 发送请求和接收响应
  4. Android JNI简单实例
  5. 关于 radioButton和 checkBox 的样式
  6. android 菜单实例

随机推荐

  1. android 图片画画板
  2. Android(安卓)设置圆角背景
  3. android 通过广播监听网络连接状况
  4. (二) Android(安卓)NDK 官方下载地址
  5. Android(安卓)Wi-Fi EAP-SIM代码解析
  6. Android(安卓)SDK更新 Connection to htt
  7. Android(安卓)APK权限大全
  8. Android自定义样式style.xml
  9. android 让Activity单例运行
  10. android通过http上传图片