本文整理汇总了Java中android.support.annotation.AnimatorRes类的典型用法代码示例。如果您正苦于以下问题:Java AnimatorRes类的具体用法?Java AnimatorRes怎么用?Java AnimatorRes使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AnimatorRes类属于android.support.annotation包,在下文中一共展示了AnimatorRes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configureIndicator
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
public void configureIndicator(int indicatorWidth, int indicatorHeight, int indicatorMargin,
@AnimatorRes int animatorId, @AnimatorRes int animatorReverseId,
@DrawableRes int indicatorBackgroundId,
@DrawableRes int indicatorUnselectedBackgroundId) {
mIndicatorWidth = indicatorWidth;
mIndicatorHeight = indicatorHeight;
mIndicatorMargin = indicatorMargin;
mAnimatorResId = animatorId;
mAnimatorReverseResId = animatorReverseId;
mIndicatorBackgroundResId = indicatorBackgroundId;
mIndicatorUnselectedBackgroundResId = indicatorUnselectedBackgroundId;
checkIndicatorConfig(getContext());
}
示例2: configureIndicator
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
public void configureIndicator(int indicatorWidth, int indicatorHeight, int indicatorMargin,
@AnimatorRes int animatorId, @AnimatorRes int animatorReverseId,
@DrawableRes int indicatorBackgroundId,
@DrawableRes int indicatorUnselectedBackgroundId) {
mIndicatorWidth = indicatorWidth;
mIndicatorHeight = indicatorHeight;
mIndicatorMargin = indicatorMargin;
mAnimatorResId = animatorId;
mAnimatorReverseResId = animatorReverseId;
mIndicatorBackgroundResId = indicatorBackgroundId;
mIndicatorUnselectedBackgroundResId = indicatorUnselectedBackgroundId;
checkIndicatorConfig(getContext());
}
示例3: createFromResource
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
/** Inflates an instance of MotionSpec from the given animator resource. */
@Nullable
public static MotionSpec createFromResource(Context context, @AnimatorRes int id) {
try {
Animator animator = AnimatorInflater.loadAnimator(context, id);
if (animator instanceof AnimatorSet) {
AnimatorSet set = (AnimatorSet) animator;
return createSpecFromAnimators(set.getChildAnimations());
} else if (animator != null) {
List<Animator> animators = new ArrayList<>();
animators.add(animator);
return createSpecFromAnimators(animators);
} else {
return null;
}
} catch (Exception e) {
Log.w(TAG, "Can't load animation resource ID #0x" + Integer.toHexString(id), e);
return null;
}
}
示例4: configureIndicator
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
public void configureIndicator(int indicatorWidth, int indicatorHeight, int indicatorMargin,
@AnimatorRes int animatorId, @AnimatorRes int animatorReverseId,
@DrawableRes int indicatorBackgroundId,
@DrawableRes int indicatorUnselectedBackgroundId) {
mIndicatorWidth = indicatorWidth;
mIndicatorHeight = indicatorHeight;
mIndicatorMargin = indicatorMargin;
mAnimatorResId = animatorId;
mAnimatorReverseResId = animatorReverseId;
mIndicatorBackgroundResId = indicatorBackgroundId;
mIndicatorUnselectedBackgroundResId = indicatorUnselectedBackgroundId;
checkIndicatorConfig(getContext());
}
示例5: configureIndicator
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
public void configureIndicator(int indicatorWidth, int indicatorHeight, int indicatorMargin,
@AnimatorRes int animatorId, @AnimatorRes int animatorReverseId,
@DrawableRes int indicatorBackgroundId,
@DrawableRes int indicatorUnselectedBackgroundId) {
mIndicatorWidth = indicatorWidth;
mIndicatorHeight = indicatorHeight;
mIndicatorMargin = indicatorMargin;
mAnimatorResId = animatorId;
mAnimatorReverseResId = animatorReverseId;
mIndicatorBackgroundResId = indicatorBackgroundId;
mIndicatorUnselectedBackgroundResId = indicatorUnselectedBackgroundId;
}
示例6: onCreateMotionSpec
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
@Override
protected FabTransformationSpec onCreateMotionSpec(Context context, boolean expanded) {
@AnimatorRes int specRes;
if (expanded) {
specRes = R.animator.mtrl_fab_transformation_sheet_expand_spec;
} else {
specRes = R.animator.mtrl_fab_transformation_sheet_collapse_spec;
}
FabTransformationSpec spec = new FabTransformationSpec();
spec.timings = MotionSpec.createFromResource(context, specRes);
spec.positioning = new Positioning(Gravity.CENTER, 0f, 0f);
return spec;
}
开发者ID:material-components,项目名称:material-components-android,代码行数:15,代码来源:FabTransformationSheetBehavior.java
示例7: HandleAnimationManager
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
protected HandleAnimationManager(View handle, @AnimatorRes int grabAnimator, @AnimatorRes int releaseAnimator) {
if (grabAnimator != -1) {
this.grabAnimator = (AnimatorSet) AnimatorInflater.loadAnimator(handle.getContext(), grabAnimator);
this.grabAnimator.setTarget(handle);
}
if (releaseAnimator != -1) {
this.releaseAnimator = (AnimatorSet) AnimatorInflater.loadAnimator(handle.getContext(), releaseAnimator);
this.releaseAnimator.setTarget(handle);
}
}
示例8: setIconAnimation
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
public Builder setIconAnimation(@AnimatorRes int iconAnimation) {
params.iconAnimator = (AnimatorSet) AnimatorInflater.loadAnimator(context, iconAnimation);
return this;
}
示例9: setLoadingAnim
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
public void setLoadingAnim(@AnimatorRes int animId) {
mLoadingAnim = AnimatorInflater.loadAnimator(getContext(), animId);
}
示例10: getIncomingAnimation
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
/**
*/
@Override
@AnimatorRes
public int getIncomingAnimation() {
return mInAnimRes;
}
示例11: getOutgoingAnimation
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
/**
*/
@Override
@AnimatorRes
public int getOutgoingAnimation() {
return mOutAnimRes;
}
示例12: getIncomingBackStackAnimation
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
/**
*/
@Override
@AnimatorRes
public int getIncomingBackStackAnimation() {
return mInBackAnimRes;
}
示例13: getOutgoingBackStackAnimation
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
/**
*/
@Override
@AnimatorRes
public int getOutgoingBackStackAnimation() {
return mOutBackAnimRes;
}
示例14: setShowMotionSpecResource
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
public void setShowMotionSpecResource(@AnimatorRes int id) {
setShowMotionSpec(MotionSpec.createFromResource(context, id));
}
示例15: setHideMotionSpecResource
import android.support.annotation.AnimatorRes; //导入依赖的package包/类
public void setHideMotionSpecResource(@AnimatorRes int id) {
setHideMotionSpec(MotionSpec.createFromResource(context, id));
}