English 中文(简体)
接着是Go to Next Activities
原标题:Fading Background then Go to Next Activity

我只想像安乐鸟这样的著名的游戏,在你开始游戏时,有两条屏幕,然后跳出,然后到另一个屏幕上,然后发现主菜。 如何这样做? 目前,我的法典是穿着和脱掉的。 令人惊讶的是,在执行以下法典之后,该守则没有完结。 任何想法?

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);

    }
}
最佳回答

可以通过活动估算做到这一点。

仅在援引<条码> 启动后,打电话

overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);

第一个论点是,你即将开始的活动将失败,第二个论点具体指出,对目前处于原状的活动来说,是一种不充分的估计。

问题回答

暂无回答




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签