Widget - SnackBar Animation

//OnCreate

in.setTarget(linear3);
in.setPropertyName("translationY");
in.setFloatValues((float)(getDip((int)(-50))));
in.setDuration((int)(500));
in.setInterpolator(new LinearInterpolator());
in.start();

//OnStart

timer = new TimerTask() {
@Override
public void run() {
runOnUiThread(new Runnable() {
@Override
public void run() {
out.setTarget(linear3);
out.setPropertyName("translationY");
out.setFloatValues((float)(getDip((int)(50))));
out.setDuration((int)(500));
out.setInterpolator(new LinearInterpolator());
out.start();
}
});
}
};
_timer.schedule(timer, (int)(4000));

Components:
1. Object Animator (in+out)
2. Timer

Xml:
1. Vertical_layout
2. Inside the (Layout) add Linear1
3. Add Layout for Snackbar
It should be hidden
Snackbar_Layout_Width="50dp"
Linear1 Match Parent

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