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

How to enable download in webview in Sketchware apps?

TextInputLayout in Sketchware

Create Stopwatch App in Android using Sketchware

How to integrate Admob Ads in Sketchware project using AIDE?

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

Code for implementing Notifications in Sketchware

A Flash Light App in Sketchware

Create a Stopwatch App using Chronometer in Sketchware

Create app to save all passwords, protected using voice key