一般android在启动的时候都会有一个splash页面,页面可以做一些动画,本次的welcome页面使用了一个imageview,宽度和高度设置fill_parent,然后设置图片全屏显示 android:scaleType="fitXY" 这样不管图片多大都会全屏显示
然后在activity 用view.inflate 来加载layout,声明一个动画对象,AlphaAnimation animation = new AlphaAnimation(0.5f,0.8f);,设置动画执行的时间,设置动画的事件,然后用view启动动画。最后在动画的事件里面执行完毕后跳转到mainactivity 关闭本activity
welcome.activity
 View view = View.inflate(this, R.layout.activity_welcome, null);
		setContentView(view);
		//创建一个alphaAnimation对象
		AlphaAnimation animation = new AlphaAnimation(0.5f,0.8f);
		//创建动画执行时间
		animation.setDuration(3000);
		//设置动画后的执行操作
		animation.setAnimationListener(new AnimationListener() {
			
			@Override
			public void onAnimationStart(Animation animation) {
				// 开始执行
				
			}
			
			@Override
			public void onAnimationRepeat(Animation animation) {
				// 重复执行
				
			}
			
			@Override
			public void onAnimationEnd(Animation animation) {
				// 执行完毕
				Intent intent = new Intent(WelcomeActivity.this, MainActivity.class);
				startActivity(intent);
				WelcomeActivity.this.finish();
			}
		});
		//设置view动画
		view.startAnimation(animation); 
activity_welcome.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"  >
    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" 
        android:src="@drawable/splash"
        android:scaleType="fitXY"/>
</RelativeLayout>
之后肯定还需要完善的