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


Java AnimatorRes类代码示例

本文整理汇总了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());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:CircleIndicator.java

示例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());
}
 
开发者ID:SkylineLabs,项目名称:FindX,代码行数:17,代码来源:CircleIndicator.java

示例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;
  }
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:21,代码来源:MotionSpec.java

示例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());
}
 
开发者ID:fython,项目名称:BiliNyan-Android,代码行数:17,代码来源:CircleIndicator.java

示例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;
}
 
开发者ID:michaelbel,项目名称:material,代码行数:15,代码来源:IndicatorView.java

示例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);
    }
}
 
开发者ID:FutureMind,项目名称:recycler-fast-scroll,代码行数:11,代码来源:CustomHandleBehavior.java

示例8: setIconAnimation

import android.support.annotation.AnimatorRes; //导入依赖的package包/类
public Builder setIconAnimation(@AnimatorRes int iconAnimation) {
    params.iconAnimator = (AnimatorSet) AnimatorInflater.loadAnimator(context, iconAnimation);
    return this;
}
 
开发者ID:AviranAbady,项目名称:CookieBar2,代码行数:5,代码来源:CookieBar.java

示例9: setLoadingAnim

import android.support.annotation.AnimatorRes; //导入依赖的package包/类
public void setLoadingAnim(@AnimatorRes int animId) {
    mLoadingAnim = AnimatorInflater.loadAnimator(getContext(), animId);
}
 
开发者ID:xiong-it,项目名称:LoadingLayout,代码行数:4,代码来源:LoadingLayout.java

示例10: getIncomingAnimation

import android.support.annotation.AnimatorRes; //导入依赖的package包/类
/**
 */
@Override
@AnimatorRes
public int getIncomingAnimation() {
	return mInAnimRes;
}
 
开发者ID:universum-studios,项目名称:android_fragments,代码行数:8,代码来源:BasicFragmentTransition.java

示例11: getOutgoingAnimation

import android.support.annotation.AnimatorRes; //导入依赖的package包/类
/**
 */
@Override
@AnimatorRes
public int getOutgoingAnimation() {
	return mOutAnimRes;
}
 
开发者ID:universum-studios,项目名称:android_fragments,代码行数:8,代码来源:BasicFragmentTransition.java

示例12: getIncomingBackStackAnimation

import android.support.annotation.AnimatorRes; //导入依赖的package包/类
/**
 */
@Override
@AnimatorRes
public int getIncomingBackStackAnimation() {
	return mInBackAnimRes;
}
 
开发者ID:universum-studios,项目名称:android_fragments,代码行数:8,代码来源:BasicFragmentTransition.java

示例13: getOutgoingBackStackAnimation

import android.support.annotation.AnimatorRes; //导入依赖的package包/类
/**
 */
@Override
@AnimatorRes
public int getOutgoingBackStackAnimation() {
	return mOutBackAnimRes;
}
 
开发者ID:universum-studios,项目名称:android_fragments,代码行数:8,代码来源:BasicFragmentTransition.java

示例14: setShowMotionSpecResource

import android.support.annotation.AnimatorRes; //导入依赖的package包/类
public void setShowMotionSpecResource(@AnimatorRes int id) {
  setShowMotionSpec(MotionSpec.createFromResource(context, id));
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:4,代码来源:ChipDrawable.java

示例15: setHideMotionSpecResource

import android.support.annotation.AnimatorRes; //导入依赖的package包/类
public void setHideMotionSpecResource(@AnimatorRes int id) {
  setHideMotionSpec(MotionSpec.createFromResource(context, id));
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:4,代码来源:ChipDrawable.java


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