Back to project page Arvutaja.
The source code is released under:
Apache License
If you think the Android project Arvutaja listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ee.ioc.phon.android.arvutaja; // w w w . j av a 2 s.c o m import android.content.Context; import android.view.View; import android.view.animation.Animation; import android.view.animation.AnimationUtils; public class Animations { public static void startFadeAnimation(Context context, int resource, final View view, final int finalVisibility) { Animation fade = AnimationUtils.loadAnimation(context, resource); startFadeAnimation(fade, view, finalVisibility); } public static void startFadeAnimation(Animation fade, final View view, final int finalVisibility) { fade.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationEnd(Animation animation) { view.setVisibility(finalVisibility); view.clearAnimation(); } @Override public void onAnimationRepeat(Animation animation) { } @Override public void onAnimationStart(Animation animation) { } }); view.startAnimation(fade); } }