相关疑难解决方法(0)

褪色背景然后转到下一个活动

我只是想模仿像愤怒的小鸟这样的著名游戏,当你开始游戏时,有几个屏幕,闪烁然后淡出,然后转到另一个屏幕,淡出然后出现主菜单。我怎么做?目前我的代码是淡入淡出。在实现下面的代码后,令人惊讶的是,它没有动画。有什么想法吗?

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 …
Run Code Online (Sandbox Code Playgroud)

android transitions

2
推荐指数
1
解决办法
2420
查看次数

标签 统计

android ×1

transitions ×1