Animation Fade

//IN

final AlphaAnimation fadeIn = new AlphaAnimation(1.0f,0.0f);
final AlphaAnimation fadeOut = new AlphaAnimation(0.0f,1.0f);

text.startAnimation(fadeIn);
text.startAnimation(fadeOut);
fadeIn.setDuration(1200);
fadeIn.setFillAfter(true);
fadeOut.setDuration(1200);
fadeOut.setFillAfter(true);
fadeOut.setStartOffset(10+fadeIn.getStartOffset());

//OUT


final AlphaAnimation fadeIn = new AlphaAnimation(0.0f,1.0f);
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f,0.0f);

text.startAnimation(fadeIn);
text.startAnimation(fadeOut);
fadeIn.setDuration(1200);
fadeIn.setFillAfter(true);
fadeOut.setDuration(1200);
fadeOut.setFillAfter(true);
fadeOut.setStartOffset(10+fadeIn.getStartOffset());

Komentar

Cara pembuatan Apps paling Populer

Create Stopwatch App in Android using Sketchware

TextInputLayout in Sketchware

How to find and​ highlight a word in a text field in Sketchware?

A Flash Light App in Sketchware

How to enable download in webview in Sketchware apps?

Intent - Open File By Type

Code for implementing Notifications in Sketchware

How to share an image from Drawable folder?

ActionBar back button

Animation Transtition Animation