English 中文(简体)
and 采用时间表来估计
原标题:android: Problem using schedule to call an animation

当我装满时,我会把一个屏幕上。 在“AnimationEnd I”中,要求它把职能2放在后面,从而再次唤醒这一看法。 目前,它已经 an灭,但计划人似乎从未把囚犯叫走。 如果我点回家,那就立即把死者带走。 如果时间表正在运行,那么,为什么要等到它失去重点时,那么,要把重点重新放在实际触发时间表所要求的功能上。 该法典:

这些定义载于《刑法》中:

slideTopIn = AnimationUtils.loadAnimation(this, R.anim.slide_top_in);
slideTopIn.setAnimationListener(slideTopInListener);
slideTopOut = AnimationUtils.loadAnimation(this, R.anim.slide_top_out);
slideTopOut.setAnimationListener(slideTopOutListener);

freeAlertMsg.startAnimation(slideTopIn);

These are defined outside the onCreate within the activity class:

private AnimationListener slideTopInListener = new AnimationListener(){
    public void onAnimationEnd(Animation anim){
        alertTimer.schedule(new Runnable() {
            public void run() { hideFreeAlert(); }
        }, 2, TimeUnit.SECONDS);
    };
    public void onAnimationStart(Animation anim){
        freeAlertMsg.setVisibility(View.VISIBLE);
    };
    public void onAnimationRepeat(Animation anim){

    };
};

private AnimationListener slideTopOutListener = new AnimationListener(){
    public void onAnimationEnd(Animation anim){
        mainScreen.removeView(freeAlert);
    };
    public void onAnimationStart(Animation anim){
        Log.d("Animation Listener","slideTopOutListener");
    };
    public void onAnimationRepeat(Animation anim){

    };
};

private void hideFreeAlert(){
    freeAlertMsg.startAnimation(slideTopOut);
}

因此,它基本上实施开端注射。 那么就没有发生。 如果一度点回家,然后回头看,开始安提(滑坡道)就立即执行。 我对时间表的猜测实际上起作用,但出于某种原因,从来不会引发 an。

问题回答

Just calls postDelayed() on any View





相关问题
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 ...

热门标签