Search in sources :

Example 1 with PathView

use of com.eftimoff.androipathview.PathView in project android-pathview by geftimov.

the class SecondActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_second);
    final PathView pathView = (PathView) findViewById(R.id.pathView);
    //        final Path path = makeConvexArrow(50, 100);
    //        pathView.setPath(path);
    //       pathView.setFillAfter(true);
    //  pathView.useNaturalColors();
    pathView.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            pathView.getPathAnimator().delay(100).duration(1500).interpolator(new AccelerateDecelerateInterpolator()).start();
        }
    });
}
Also used : PathView(com.eftimoff.androipathview.PathView) AccelerateDecelerateInterpolator(android.view.animation.AccelerateDecelerateInterpolator) PathView(com.eftimoff.androipathview.PathView) View(android.view.View)

Example 2 with PathView

use of com.eftimoff.androipathview.PathView 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)

Example 3 with PathView

use of com.eftimoff.androipathview.PathView in project easy by MehdiBenmesa.

the class SplashActivity 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(SplashActivity.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)

Aggregations

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