我有负载屏幕。如何在加载应用程序时播放视频? (比如Gameloft游戏) 有人可以给我任何例子吗?
我的代码带有文字动画
package com.lineage.goddess;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.Animation.AnimationListener;
import android.widget.TextView;
public class Splash extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.splash);
startAnimation();
}
private void startAnimation() {
// TODO Auto-generated method stub
TextView logo1= (TextView) findViewById(R.id.TextView1);
Animation fade1= AnimationUtils.loadAnimation(this, R.anim.fade_in);
logo1.startAnimation(fade1);
TextView logo2= (TextView) findViewById(R.id.TextView2);
Animation fade2= AnimationUtils.loadAnimation(this, R.anim.fade_in);
logo2.startAnimation(fade2);
fade2.setAnimationListener(new AnimationListener() {
public void onAnimationStart(Animation animation) {}
public void onAnimationRepeat(Animation animation) {}
public void onAnimationEnd(Animation animation) {
Intent i = new Intent( Splash.this, menu.class );
Splash.this.startActivity( i );
}
});
logo2.startAnimation(fade2);
}
}