当前位置: 首页>>代码示例>>Java>>正文


Java SupportAnimator.setInterpolator方法代码示例

本文整理汇总了Java中io.codetail.animation.SupportAnimator.setInterpolator方法的典型用法代码示例。如果您正苦于以下问题:Java SupportAnimator.setInterpolator方法的具体用法?Java SupportAnimator.setInterpolator怎么用?Java SupportAnimator.setInterpolator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在io.codetail.animation.SupportAnimator的用法示例。


在下文中一共展示了SupportAnimator.setInterpolator方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: revealOff

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
@Override
final void revealOff(final View fab, final View transformView, final RevealCallback callback) {
    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(
            transformView,
            getCenterX(fab),
            getCenterY(fab),
            (float) Math.hypot(transformView.getWidth(), transformView.getHeight()) / 2,
            fab.getWidth() / 2);
    animator.setInterpolator(REVEAL_INTERPOLATOR);
    animator.addListener(new SupportAnimator.AnimatorListener() {
        @Override
        public void onAnimationStart() {
            callback.onRevealStart();
        }

        @Override
        public void onAnimationEnd() {
            transformView.setVisibility(View.INVISIBLE);
            callback.onRevealEnd();
        }

        @Override
        public void onAnimationCancel() {
            //
        }

        @Override
        public void onAnimationRepeat() {
            //
        }
    });
    if (transformView.getVisibility() == View.VISIBLE) {
        animator.setDuration((int) getRevealAnimationDuration());
        animator.start();
        transformView.setEnabled(true);
    }
}
 
开发者ID:SimonCherryGZ,项目名称:JewelryUI,代码行数:38,代码来源:FabAnimatorPreL.java

示例2: circularDismissView

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
private void circularDismissView(final View view) {
	final int DURATION = 600;

	// Get the center for the FAB
	int cx = (int) view.getX() + view.getMeasuredHeight() / 2;
	int cy = (int) view.getY() + view.getMeasuredWidth() / 2;

	// get the final radius for the clipping circle
	int dx = Math.max(cx, view.getWidth() - cx);
	int dy = Math.max(cy, view.getHeight() - cy);
	float finalRadius = (float) Math.hypot(dx, dy);

	final SupportAnimator dismissAnimation = ViewAnimationUtils.createCircularReveal(view, cx, cy, 0, finalRadius).reverse();
	dismissAnimation.setInterpolator(new AccelerateDecelerateInterpolator());
	dismissAnimation.setDuration(DURATION);
	dismissAnimation.start();
	new Handler().postDelayed(new Runnable() {
		@Override
		public void run() {
			mSuperContainer.setVisibility(View.GONE);
		}
	}, DURATION);
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:24,代码来源:UpdateDialogHandler.java

示例3: appearRed

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
void appearRed() {
    mRed.setVisibility(View.VISIBLE);

    int cx = mRed.getWidth() / 2;
    int cy = mRed.getHeight() / 2;

    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mRed, cx, cy, 0, mRed.getWidth() / 2);
    animator.addListener(new SimpleListener() {
        @Override
        public void onAnimationEnd() {
            upRed();
        }
    });
    animator.setInterpolator(ACCELERATE);
    animator.start();
}
 
开发者ID:Haoxiqiang,项目名称:MaterialCalendar,代码行数:17,代码来源:MemoFragment.java

示例4: disappearBluePair

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
void disappearBluePair()
{
    float finalRadius = Math.max(mBluePair.getWidth(), mBluePair.getHeight()) * 1.5f;

    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mBluePair, endBlueX, endBlueY,
            finalRadius, mBlue.getWidth() / 2f);
    animator.setDuration(500);
    animator.addListener(new SimpleListener()
    {
        @Override
        public void onAnimationEnd()
        {
            mBluePair.setVisibility(View.INVISIBLE);
            returnBlue();
        }
    });
    animator.setInterpolator(DECELERATE);
    animator.start();
}
 
开发者ID:cagkanciloglu,项目名称:ArcAnimator-master,代码行数:20,代码来源:TransitionLoopFragment.java

示例5: disappearBluePair

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
void disappearBluePair() {
    float finalRadius = Math.max(mBluePair.getWidth(), mBluePair.getHeight()) * 1.5f;

    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mBluePair, endBlueX, endBlueY,
            finalRadius, mBlue.getWidth() / 2f);
    animator.setDuration(500);
    animator.addListener(new SimpleListener() {
        @Override
        public void onAnimationEnd() {
            mBluePair.setVisibility(View.INVISIBLE);
            returnBlue();
        }
    });
    animator.setInterpolator(DECELERATE);
    animator.start();
}
 
开发者ID:Haoxiqiang,项目名称:MaterialCalendar,代码行数:17,代码来源:MemoFragment.java

示例6: appearRed

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
void appearRed()
{
    mRed.setVisibility(View.VISIBLE);

    int cx = mRed.getWidth() / 2;
    int cy = mRed.getHeight() / 2;

    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mRed, cx, cy, 0, mRed.getWidth() / 2);
    animator.addListener(new SimpleListener()
    {
        @Override
        public void onAnimationEnd()
        {
            upRed();
        }
    });
    animator.setInterpolator(ACCELERATE);
    animator.start();
}
 
开发者ID:cagkanciloglu,项目名称:ArcAnimator-master,代码行数:20,代码来源:TransitionLoopFragment.java

示例7: disappearRed

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
void disappearRed()
{

    int cx = mRed.getWidth() / 2;
    int cy = mRed.getHeight() / 2;

    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mRed, cx, cy, mRed.getWidth() / 2, 0);
    animator.addListener(new SimpleListener()
    {
        @Override
        public void onAnimationEnd()
        {
            mRed.setVisibility(View.INVISIBLE);
            ViewHelper.setX(mRed, startRedX);
            ViewHelper.setY(mRed, startRedY);
            release();
        }
    });
    animator.setInterpolator(DECELERATE);
    animator.start();
}
 
开发者ID:cagkanciloglu,项目名称:ArcAnimator-master,代码行数:22,代码来源:MainActivity.java

示例8: appearBluePair

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
void appearBluePair() {
    mBluePair.setVisibility(View.VISIBLE);

    float finalRadius = Math.max(mBluePair.getWidth(), mBluePair.getHeight()) * 1.5f;

    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mBluePair, endBlueX, endBlueY, mBlue.getWidth() / 2f,
            finalRadius);
    animator.setDuration(500);
    animator.setInterpolator(ACCELERATE);
    animator.addListener(new SimpleListener() {
        @Override
        public void onAnimationEnd() {
            raise();
        }
    });
    animator.start();
}
 
开发者ID:asyl,项目名称:ArcAnimator,代码行数:18,代码来源:TransitionLoopFragment.java

示例9: disappearRed

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
void disappearRed() {

        int cx = mRed.getWidth() / 2;
        int cy = mRed.getHeight() / 2;

        SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mRed, cx, cy, mRed.getWidth() / 2, 0);
        animator.addListener(new SimpleListener() {
            @Override
            public void onAnimationEnd() {
                mRed.setVisibility(View.INVISIBLE);
                mRed.setX(startRedX);
                mRed.setY(startRedY);
                release();
            }
        });
        animator.setInterpolator(DECELERATE);
        animator.start();
    }
 
开发者ID:asyl,项目名称:ArcAnimator,代码行数:19,代码来源:TransitionLoopFragment.java

示例10: replaceFragment

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
/**
 * 切换item点击,CIrcularReveal视图效果
 * @param screenShotable
 * @param topPosition
 * @return
 */
private ScreenShotable replaceFragment(ScreenShotable screenShotable, int topPosition) {
    this.res = this.res == R.drawable.content_music ? R.drawable.content_films : R.drawable.content_music;
    View view = findViewById(R.id.content_frame);
    int finalRadius = Math.max(view.getWidth(), view.getHeight());
    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(view, 0, topPosition, 0, finalRadius);
    animator.setInterpolator(new AccelerateInterpolator());
    animator.setDuration(ViewAnimator.CIRCULAR_REVEAL_ANIMATION_DURATION);

    //设置背景!
    findViewById(R.id.content_overlay).setBackgroundDrawable(new BitmapDrawable(getResources(), screenShotable.getBitmap()));
    animator.start();
    ContentFragment contentFragment = ContentFragment.newInstance(this.res);
    getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, contentFragment).commit();
    return contentFragment;
}
 
开发者ID:brucetoo,项目名称:Side-Menu,代码行数:22,代码来源:MainActivity.java

示例11: revealOn

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
@Override
final void revealOn(final View fab, final View transformView, final RevealCallback callback) {
    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(
            transformView,
            getCenterX(fab),
            getCenterY(fab),
            fab.getWidth() / 2,
            (float) Math.hypot(transformView.getWidth(), transformView.getHeight()) / 2);
    transformView.setVisibility(View.VISIBLE);
    animator.setInterpolator(FAB_INTERPOLATOR);
    animator.addListener(new SupportAnimator.AnimatorListener() {
        @Override
        public void onAnimationStart() {
            callback.onRevealStart();
        }

        @Override
        public void onAnimationEnd() {
            callback.onRevealEnd();
        }

        @Override
        public void onAnimationCancel() {
            //
        }

        @Override
        public void onAnimationRepeat() {
            //
        }
    });
    if (transformView.getVisibility() == View.VISIBLE) {
        animator.setDuration((int) getRevealAnimationDuration());
        animator.start();
        transformView.setEnabled(true);
    }
}
 
开发者ID:SimonCherryGZ,项目名称:JewelryUI,代码行数:38,代码来源:FabAnimatorPreL.java

示例12: replaceFragment

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
private ScreenShotable replaceFragment(ScreenShotable screenShotable, int topPosition) {
    this.res = this.res == R.drawable.home_bg1 ? R.drawable.home_bg2 : R.drawable.home_bg1;
    View view = findViewById(R.id.content_frame);
    int finalRadius = Math.max(view.getWidth(), view.getHeight());
    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(view, 0, topPosition, 0, finalRadius);
    animator.setInterpolator(new AccelerateInterpolator());
    animator.setDuration(ViewAnimator.CIRCULAR_REVEAL_ANIMATION_DURATION);

    findViewById(R.id.content_overlay).setBackgroundDrawable(new BitmapDrawable(getResources(), screenShotable.getBitmap()));
    animator.start();
    MainContentFragment contentFragment = MainContentFragment.newInstance(this.res);
    fragmentManager.beginTransaction().replace(R.id.content_frame, contentFragment).commit();
    return contentFragment;
}
 
开发者ID:zongkaili,项目名称:MenuSet,代码行数:15,代码来源:MainActivity.java

示例13: startReveal

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
private void startReveal(final RelativeLayout view, boolean reverse){

        //Change statusbar color
        if(!reverse) WindowUtil.changeStatusBarColor(LoginActivity.this, "#E91E63"); //Need to put string because resource link doesn't work
        else WindowUtil.changeStatusBarColor(LoginActivity.this, "#1976D2");

        // Get the center for the clipping circle
        int cx = (view.getLeft() + view.getRight()) / 2;
        int cy = view.getBottom() - 60;

        // Get the final radius for the clipping circle
        int dx = Math.max(cx, view.getWidth() - cx);
        int dy = Math.max(cy, view.getHeight() - cy);
        float finalRadius = (float) Math.hypot(dx, dy);

        view.setVisibility(View.VISIBLE);

        SupportAnimator animator =
                ViewAnimationUtils.createCircularReveal(view, cx, cy, 0, finalRadius);
        animator.setInterpolator(new AccelerateDecelerateInterpolator());
        animator.setDuration(500);
        if(reverse) {
            animator = animator.reverse();
            animator.addListener(new SupportAnimator.AnimatorListener() {
                @Override public void onAnimationEnd() { view.setVisibility(View.INVISIBLE); }
                @Override public void onAnimationCancel() {}
                @Override public void onAnimationRepeat() {}
                @Override public void onAnimationStart() {}
            });
        }
        animator.start();
    }
 
开发者ID:Marplex,项目名称:Schoolbook,代码行数:33,代码来源:LoginActivity.java

示例14: revealFrom

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
public static SupportAnimator revealFrom(int x, int y, View target, int duration, final AnimationListener callback) {
    int radius = Math.max(target.getWidth(), target.getHeight());

    SupportAnimator animator2 = ViewAnimationUtils.createCircularReveal(target, x, y, 0, radius);

    if (duration > 0)
        animator2.setDuration(duration);

    animator2.addListener(new SupportAnimator.AnimatorListener() {
        @Override
        public void onAnimationStart() {

        }

        @Override
        public void onAnimationEnd() {
            if (callback != null)
                callback.onAnimEnd();
        }

        @Override
        public void onAnimationCancel() {

        }

        @Override
        public void onAnimationRepeat() {

        }
    });
    animator2.setInterpolator(new AccelerateDecelerateInterpolator());
    target.setVisibility(View.VISIBLE);
    animator2.start();
    return animator2;
}
 
开发者ID:y3seker,项目名称:EgeYemekhaneMobil,代码行数:36,代码来源:AnimUtils.java

示例15: collapseTo

import io.codetail.animation.SupportAnimator; //导入方法依赖的package包/类
public static void collapseTo(int x, int y, final View target, int duration, final AnimationListener callback) {
    int radius = Math.max(target.getWidth(), target.getHeight());

    SupportAnimator animator2 = ViewAnimationUtils.createCircularReveal(target, x, y, radius, 0);

    if (duration > 0)
        animator2.setDuration(duration);
    target.setVisibility(View.VISIBLE);
    animator2.addListener(new SupportAnimator.AnimatorListener() {
        @Override
        public void onAnimationStart() {

        }

        @Override
        public void onAnimationEnd() {
            target.setVisibility(View.GONE);
            if (callback != null) callback.onAnimEnd();
        }

        @Override
        public void onAnimationCancel() {

        }

        @Override
        public void onAnimationRepeat() {

        }
    });
    animator2.setInterpolator(new AccelerateDecelerateInterpolator());
    animator2.start();
}
 
开发者ID:y3seker,项目名称:EgeYemekhaneMobil,代码行数:34,代码来源:AnimUtils.java


注:本文中的io.codetail.animation.SupportAnimator.setInterpolator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。