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

<?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预定义样式
  2. Android(安卓)requires compiler compliance level 5.0 or 6.0.
  3. Android:UI设置-横竖屏转换、输入法键盘相关设置
  4. My Android(安卓)Camera Notes
  5. Android系统中自带的图标&一些预定义样式&参考颜色值
  6. 安卓相关学习
  7. Android控件属性大全
  8. Android控件属性大全
  9. android布局属性大全

随机推荐

  1. android studio 开发 Execution failed f
  2. [Android] Nexus 7 二代连接 Windows 7
  3. android 模拟器访问本机http服务IP地址问
  4. Android程序员学IOS-UI篇
  5. android listview的创建及行删除操作
  6. Android实现悬浮图片
  7. Android 内核源代码交叉编译(创建自己的
  8. Android 开发环境配置--实现第一个app “
  9. android对界面某一部分进行截图的方法
  10. Android了解