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


Java SupportAnimator类代码示例

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


SupportAnimator类属于io.codetail.animation包,在下文中一共展示了SupportAnimator类的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: animateBg

import io.codetail.animation.SupportAnimator; //导入依赖的package包/类
public void animateBg() {
    mImage.setVisibility(INVISIBLE);

    int cx = mImage.getWidth();
    int cy = mImage.getHeight();

    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mImage, cx, cy, 0, Math.max(cx, cy));
    animator.addListener(new SupportAnimator.SimpleAnimatorListener() {
        @Override
        public void onAnimationStart() {
            super.onAnimationStart();
            mImage.setVisibility(VISIBLE);
        }
    });
    animator.setStartDelay(500);
    animator.start();
}
 
开发者ID:morogoku,项目名称:MTweaks-KernelAdiutorMOD,代码行数:18,代码来源:NavHeaderView.java

示例3: onPostExecute

import io.codetail.animation.SupportAnimator; //导入依赖的package包/类
protected void onPostExecute(Void voi) {
	SupportAnimator.AnimatorListener animator = new SupportAnimator.AnimatorListener() {
		@Override
		public void onAnimationEnd() {
			navigateToNextActivity();
		}

		@Override
		public void onAnimationStart() {}
		@Override
		public void onAnimationCancel() {}
		@Override
		public void onAnimationRepeat() {}
	};

	if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && !mTransitionViewWhite.isAttachedToWindow()) {
		animator.onAnimationEnd();
		return;
	}

	showTransitionAnimation().addListener(animator);
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:23,代码来源:ConfirmSetupActivity.java

示例4: quitWithAnimation

import io.codetail.animation.SupportAnimator; //导入依赖的package包/类
private void quitWithAnimation() {
	SupportAnimator animator = revealTransition.reverse();
	if (animator == null) {
		super.onBackPressed();
		return;
	}
	animator.setDuration(1000);
	animator.addListener(new SupportAnimator.AnimatorListener() {
		@Override
		public void onAnimationStart() {}

		@Override
		public void onAnimationEnd() {
			mainContentLayout.setVisibility(View.INVISIBLE);
			finish();
		}

		@Override
		public void onAnimationCancel() {}

		@Override
		public void onAnimationRepeat() {}
	});
	animator.start();
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:26,代码来源:DonationActivity.java

示例5: playInitAnimation

import io.codetail.animation.SupportAnimator; //导入依赖的package包/类
private void playInitAnimation() {
	DisplayMetrics dm = getResources().getDisplayMetrics();
	// Get the center for the FAB
	int cx = dm.widthPixels / 2;
	int cy = 0;

	float finalRadius = dm.heightPixels;

	revealTransition = ViewAnimationUtils.createCircularReveal(mainContentLayout, cx, cy, 0, finalRadius);
	revealTransition.setInterpolator(new AccelerateDecelerateInterpolator());
	revealTransition.setDuration(800);
	revealTransition.addListener(new SupportAnimator.AnimatorListener() {
		@Override
		public void onAnimationStart() {
			mainContentLayout.setVisibility(View.VISIBLE);
		}
		public void onAnimationEnd() {}
		public void onAnimationCancel() {}
		public void onAnimationRepeat() {}
	});
	revealTransition.start();
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:23,代码来源:DonationActivity.java

示例6: 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

示例7: setActivityToolbarCircularRevealAnimation

import io.codetail.animation.SupportAnimator; //导入依赖的package包/类
public static void setActivityToolbarCircularRevealAnimation(final Toolbar aDecorativeToolbar) {
	aDecorativeToolbar.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
		@Override
		public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
			v.removeOnLayoutChangeListener(this);

			int CIRCULAR_REVEAL_DURATION = 700;
			int cx = (aDecorativeToolbar.getLeft() + aDecorativeToolbar.getRight()) / 2;
			int cy = 0;

			// get the final radius for the clipping circle
			int finalRadius = Math.max(aDecorativeToolbar.getWidth(), aDecorativeToolbar.getHeight());

			SupportAnimator animator = ViewAnimationUtils.createCircularReveal(aDecorativeToolbar, cx, cy, 0, finalRadius);

			animator.setInterpolator(new AccelerateDecelerateInterpolator());
			animator.setDuration(CIRCULAR_REVEAL_DURATION);
			animator.start();
		}
	});
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:22,代码来源:AnimationService.java

示例8: enterReveal

import io.codetail.animation.SupportAnimator; //导入依赖的package包/类
void enterReveal(String type) {
    fab.setVisibility(View.GONE);
    final View myView = findViewById(R.id.reveal);
    int finalRadius = Math.max(myView.getWidth(), myView.getHeight());
    SupportAnimator anim =
            ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);
    if (type.equals("Reply")) {
        myView.setVisibility(View.VISIBLE);
        myView.findViewById(R.id.section_reply).setVisibility(View.VISIBLE);
        myView.findViewById(R.id.section_internal_note).setVisibility(View.GONE);
        overlay.setVisibility(View.VISIBLE);
    } else {
        myView.setVisibility(View.VISIBLE);
        myView.findViewById(R.id.section_reply).setVisibility(View.GONE);
        myView.findViewById(R.id.section_internal_note).setVisibility(View.VISIBLE);
        overlay.setVisibility(View.VISIBLE);
    }

    anim.start();
}
 
开发者ID:ladybirdweb,项目名称:faveo-helpdesk-android-app,代码行数:21,代码来源:TicketDetailActivity.java

示例9: createReverseReveal

import io.codetail.animation.SupportAnimator; //导入依赖的package包/类
private void createReverseReveal() {
    SupportAnimator reverseMenuAnimator = mMenuAnimator.reverse();
    mMenuAnimator = null;
    reverseMenuAnimator.setDuration(700);
    reverseMenuAnimator.addListener(new SupportAnimator.AnimatorListener() {
        @Override
        public void onAnimationStart() {
            translateFabToBottom();
        }

        @Override
        public void onAnimationEnd() {
            mMenu.setVisibility(View.GONE);
        }

        @Override
        public void onAnimationCancel() {
        }

        @Override
        public void onAnimationRepeat() {
        }
    });
    reverseMenuAnimator.start();
}
 
开发者ID:lukamarin,项目名称:Rocket.Chat-android,代码行数:26,代码来源:FabMenuLayout.java

示例10: createReveal

import io.codetail.animation.SupportAnimator; //导入依赖的package包/类
private void createReveal(int cx, int cy, float initialRadius, float finalRadius) {
    mMenuAnimator = ViewAnimationUtils.createCircularReveal(mMenu, cx, cy, initialRadius, finalRadius);
    mMenuAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
    mMenuAnimator.setDuration(500);
    mMenuAnimator.addListener(new SupportAnimator.AnimatorListener() {
        @Override
        public void onAnimationStart() {
            mMenu.setVisibility(View.VISIBLE);
        }

        @Override
        public void onAnimationEnd() {
        }

        @Override
        public void onAnimationCancel() {
        }

        @Override
        public void onAnimationRepeat() {
        }
    });
    mMenuAnimator.start();
}
 
开发者ID:lukamarin,项目名称:Rocket.Chat-android,代码行数:25,代码来源:FabMenuLayout.java

示例11: 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:Haoxiqiang,项目名称:MaterialCalendar,代码行数:18,代码来源:MemoFragment.java

示例12: 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

示例13: 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:Haoxiqiang,项目名称:MaterialCalendar,代码行数:19,代码来源:MemoFragment.java

示例14: 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

示例15: 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


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