我只想像安乐鸟这样的著名的游戏,在你开始游戏时,有两条屏幕,然后跳出,然后到另一个屏幕上,然后发现主菜。 如何这样做? 目前,我的法典是穿着和脱掉的。 令人惊讶的是,在执行以下法典之后,该守则没有完结。 任何想法?
package com.kfc;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.*;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
import android.widget.LinearLayout;
import android.widget.TextView;
public class Intro extends Activity {
LinearLayout screen;
Handler handler = new Handler();
int i;
Intent intent;
TextView tv;
Animation mAnim;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.introxml);
screen = (LinearLayout) findViewById(R.id.myintro);
Animation fade = AnimationUtils.loadAnimation(this, android.R.anim.fade_in);
fade.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationRepeat(Animation animation) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationStart(Animation animation) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationEnd(Animation animation) {
startActivity(new Intent(Intro.this, NewKFCActivity.class));
Intro.this.finish();
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
});
screen.startAnimation(fade);
}
}