Search in sources :

Example 1 with StartActivity

use of dz.easy.androidclient.Activities.StartActivity in project easy by MehdiBenmesa.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_svg);
    final PathView pathView = (PathView) findViewById(R.id.pathView);
    final PathView pathView2 = (PathView) findViewById(R.id.pathView2);
    pathView.getPathAnimator().delay(1000).duration(3500).listenerStart(new PathView.AnimatorBuilder.ListenerStart() {

        @Override
        public void onAnimationStart() {
        }
    }).listenerEnd(new PathView.AnimatorBuilder.ListenerEnd() {

        @Override
        public void onAnimationEnd() {
            Intent i = new Intent(MainActivity.this, StartActivity.class);
            startActivity(i);
            finish();
        }
    }).interpolator(new AccelerateDecelerateInterpolator()).start();
    pathView.useNaturalColors();
    pathView.setFillAfter(true);
    pathView2.getPathAnimator().delay(1000).duration(2500).listenerStart(new PathView.AnimatorBuilder.ListenerStart() {

        @Override
        public void onAnimationStart() {
        }
    }).listenerEnd(new PathView.AnimatorBuilder.ListenerEnd() {

        @Override
        public void onAnimationEnd() {
        }
    }).interpolator(new AccelerateDecelerateInterpolator()).start();
    pathView2.useNaturalColors();
    pathView2.setFillAfter(true);
}
Also used : PathView(com.eftimoff.androipathview.PathView) AccelerateDecelerateInterpolator(android.view.animation.AccelerateDecelerateInterpolator) Intent(android.content.Intent) StartActivity(dz.easy.androidclient.Activities.StartActivity)

Aggregations

Intent (android.content.Intent)1 AccelerateDecelerateInterpolator (android.view.animation.AccelerateDecelerateInterpolator)1 PathView (com.eftimoff.androipathview.PathView)1 StartActivity (dz.easy.androidclient.Activities.StartActivity)1