安卓动画欢迎界面

import android.os.Bundle;
import android.os.Handler;

import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.widget.ImageView;
import android.widget.TextView;

import com.yoodao.kongzhi.R;

//这是欢迎界面
public class WelcomeActivity extends Activity implements AnimationListener {
	private ImageView image1;
	private AlphaAnimation alph;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.welcome);
		image1 = (ImageView) findViewById(R.id.image1);
		alph = new AlphaAnimation(1, 0);
		alph.setDuration(1500);
		alph.setFillAfter(true);
		image1.setAnimation(alph);
		alph.setAnimationListener(WelcomeActivity.this);

	}

	@Override
	public void onAnimationEnd(Animation animation) {
		// TODO Auto-generated method stub
		Intent aa = new Intent(WelcomeActivity.this, ChuanKouActivity.class);
		startActivity(aa);

	}

	@Override
	public void onAnimationRepeat(Animation animation) {
		// TODO Auto-generated method stub

	}

	@Override
	public void onAnimationStart(Animation animation) {
		// TODO Auto-generated method stub

	}

}

你可能感兴趣的:(集训例案)