android.support.annotation.AnimatorRes源码实例Demo

类android.support.annotation.AnimatorRes源码实例Demo

下面列出了android.support.annotation.AnimatorRes 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: XERUNG   文件: CircleIndicator.java
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 项目: XERUNG   文件: CircleIndicator.java
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 项目: MNImageBrowser   文件: CircleIndicator.java
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());
}
 
源代码4 项目: Android-Application-ZJB   文件: CircleIndicator.java
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 项目: SuperIndicator   文件: CircleIndicator.java
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());
}
 
源代码6 项目: LefishGuide   文件: CircleIndicator.java
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());
}
 
源代码7 项目: scene   文件: PopOptions.java
@NonNull
public PopOptions.Builder setAnimation(@NonNull Activity activity,
                                       @AnimRes @AnimatorRes int enterAnim,
                                       @AnimRes @AnimatorRes int exitAnim) {
    this.mNavigationAnimationExecutor = new AnimationOrAnimatorResourceExecutor(activity, enterAnim, exitAnim);
    return this;
}
 
源代码8 项目: scene   文件: PushOptions.java
@NonNull
public Builder setAnimation(@NonNull Activity activity,
                            @AnimRes @AnimatorRes int enterAnim,
                            @AnimRes @AnimatorRes int exitAnim) {
    this.mNavigationAnimationExecutor = new AnimationOrAnimatorResourceExecutor(activity, enterAnim, exitAnim);
    return this;
}
 
源代码9 项目: android_9.0.0_r45   文件: NavOptions.java
NavOptions(int launchMode, @IdRes int popUpTo, boolean popUpToInclusive,
        @AnimRes @AnimatorRes int enterAnim, @AnimRes @AnimatorRes int exitAnim,
        @AnimRes @AnimatorRes int popEnterAnim, @AnimRes @AnimatorRes int popExitAnim) {
    mLaunchMode = launchMode;
    mPopUpTo = popUpTo;
    mPopUpToInclusive = popUpToInclusive;
    mEnterAnim = enterAnim;
    mExitAnim = exitAnim;
    mPopEnterAnim = popEnterAnim;
    mPopExitAnim = popExitAnim;
}
 
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);
    }
}
 
public AnimationOrAnimatorResourceExecutor(Activity activity, @AnimatorRes @AnimRes int enterResId, @AnimatorRes @AnimRes int exitResId) {
    mEnterAnimator = AnimationOrAnimator.loadAnimation(activity, enterResId);
    mExitAnimator = AnimationOrAnimator.loadAnimation(activity, exitResId);
}
 
源代码12 项目: android_9.0.0_r45   文件: NavOptions.java
/**
 * The custom enter Animation/Animator that should be run.
 * @return the resource id of a Animation or Animator or -1 if none.
 */
@AnimRes @AnimatorRes
public int getEnterAnim() {
    return mEnterAnim;
}
 
源代码13 项目: android_9.0.0_r45   文件: NavOptions.java
/**
 * The custom exit Animation/Animator that should be run.
 * @return the resource id of a Animation or Animator or -1 if none.
 */
@AnimRes @AnimatorRes
public int getExitAnim() {
    return mExitAnim;
}
 
源代码14 项目: MvpRoute   文件: FragmentUtils.java
public FragmentWrapper addAnimStart(@AnimRes @AnimatorRes int startAn) {
	transaction.setCustomAnimations(startAn, 0);
	return this;
}
 
源代码15 项目: MvpRoute   文件: FragmentUtils.java
public FragmentWrapper addAnimEnd(@AnimRes @AnimatorRes int endAn) {
	transaction.setCustomAnimations(0, endAn);
	return this;
}
 
源代码16 项目: relight   文件: ChipWidget.java
public ChipWidget showMotionSpecResource(@AnimatorRes int id) {
    view.setShowMotionSpecResource(id);
    return self();
}
 
源代码17 项目: relight   文件: ChipWidget.java
public ChipWidget hideMotionSpecResource(@AnimatorRes int id) {
    view.setHideMotionSpecResource(id);
    return self();
}
 
源代码18 项目: CookieBar2   文件: CookieBar.java
public Builder setIconAnimation(@AnimatorRes int iconAnimation) {
    params.iconAnimator = (AnimatorSet) AnimatorInflater.loadAnimator(context, iconAnimation);
    return this;
}
 
源代码19 项目: LoadingLayout   文件: LoadingLayout.java
public void setLoadingAnim(@AnimatorRes int animId) {
    mLoadingAnim = AnimatorInflater.loadAnimator(getContext(), animId);
}
 
public Builder withGrabAnimator(@AnimatorRes int grabAnimator) {
    this.grabAnimator = grabAnimator;
    return this;
}
 
public Builder withReleaseAnimator(@AnimatorRes int releaseAnimator) {
    this.releaseAnimator = releaseAnimator;
    return this;
}
 
public AbsBuilder<T> withShowAnimator(@AnimatorRes int showAnimatorResource){
    this.showAnimatorResource = showAnimatorResource;
    return this;
}
 
public AbsBuilder<T> withHideAnimator(@AnimatorRes int hideAnimatorResource){
    this.hideAnimatorResource = hideAnimatorResource;
    return this;
}
 
源代码24 项目: AndroidUtilCode   文件: FragmentUtils.java
/**
 * Replace fragment.
 *
 * @param srcFragment  The source of fragment.
 * @param destFragment The destination of fragment.
 * @param enterAnim    An animation or animator resource ID used for the enter animation on the
 *                     view of the fragment being added or attached.
 * @param exitAnim     An animation or animator resource ID used for the exit animation on the
 *                     view of the fragment being removed or detached.
 */
public static void replace(@NonNull final Fragment srcFragment,
                           @NonNull final Fragment destFragment,
                           @AnimatorRes @AnimRes final int enterAnim,
                           @AnimatorRes @AnimRes final int exitAnim) {
    replace(srcFragment, destFragment, null, false, enterAnim, exitAnim, 0, 0);
}
 
源代码25 项目: AndroidUtilCode   文件: FragmentUtils.java
/**
 * Replace fragment.
 *
 * @param srcFragment  The source of fragment.
 * @param destFragment The destination of fragment.
 * @param isAddStack   True to add fragment in stack, false otherwise.
 * @param enterAnim    An animation or animator resource ID used for the enter animation on the
 *                     view of the fragment being added or attached.
 * @param exitAnim     An animation or animator resource ID used for the exit animation on the
 *                     view of the fragment being removed or detached.
 */
public static void replace(@NonNull final Fragment srcFragment,
                           @NonNull final Fragment destFragment,
                           final boolean isAddStack,
                           @AnimatorRes @AnimRes final int enterAnim,
                           @AnimatorRes @AnimRes final int exitAnim) {
    replace(srcFragment, destFragment, null, isAddStack, enterAnim, exitAnim, 0, 0);
}
 
源代码26 项目: AndroidUtilCode   文件: FragmentUtils.java
/**
 * Replace fragment.
 *
 * @param srcFragment  The source of fragment.
 * @param destFragment The destination of fragment.
 * @param enterAnim    An animation or animator resource ID used for the enter animation on the
 *                     view of the fragment being added or attached.
 * @param exitAnim     An animation or animator resource ID used for the exit animation on the
 *                     view of the fragment being removed or detached.
 * @param popEnterAnim An animation or animator resource ID used for the enter animation on the
 *                     view of the fragment being readded or reattached caused by
 *                     popBackStack() or similar methods.
 * @param popExitAnim  An animation or animator resource ID used for the enter animation on the
 *                     view of the fragment being removed or detached caused by
 *                     popBackStack() or similar methods.
 */
public static void replace(@NonNull final Fragment srcFragment,
                           @NonNull final Fragment destFragment,
                           @AnimatorRes @AnimRes final int enterAnim,
                           @AnimatorRes @AnimRes final int exitAnim,
                           @AnimatorRes @AnimRes final int popEnterAnim,
                           @AnimatorRes @AnimRes final int popExitAnim) {
    replace(srcFragment, destFragment, null, false,
            enterAnim, exitAnim, popEnterAnim, popExitAnim);
}
 
源代码27 项目: AndroidUtilCode   文件: FragmentUtils.java
/**
 * Replace fragment.
 *
 * @param srcFragment  The source of fragment.
 * @param destFragment The destination of fragment.
 * @param isAddStack   True to add fragment in stack, false otherwise.
 * @param enterAnim    An animation or animator resource ID used for the enter animation on the
 *                     view of the fragment being added or attached.
 * @param exitAnim     An animation or animator resource ID used for the exit animation on the
 *                     view of the fragment being removed or detached.
 * @param popEnterAnim An animation or animator resource ID used for the enter animation on the
 *                     view of the fragment being readded or reattached caused by
 *                     popBackStack() or similar methods.
 * @param popExitAnim  An animation or animator resource ID used for the enter animation on the
 *                     view of the fragment being removed or detached caused by
 *                     popBackStack() or similar methods.
 */
public static void replace(@NonNull final Fragment srcFragment,
                           @NonNull final Fragment destFragment,
                           final boolean isAddStack,
                           @AnimatorRes @AnimRes final int enterAnim,
                           @AnimatorRes @AnimRes final int exitAnim,
                           @AnimatorRes @AnimRes final int popEnterAnim,
                           @AnimatorRes @AnimRes final int popExitAnim) {
    replace(srcFragment, destFragment, null, isAddStack,
            enterAnim, exitAnim, popEnterAnim, popExitAnim);
}
 
源代码28 项目: AndroidUtilCode   文件: FragmentUtils.java
/**
 * Replace fragment.
 *
 * @param fm          The manager of fragment.
 * @param containerId The id of container.
 * @param fragment    The new fragment to place in the container.
 * @param enterAnim   An animation or animator resource ID used for the enter animation on the
 *                    view of the fragment being added or attached.
 * @param exitAnim    An animation or animator resource ID used for the exit animation on the
 *                    view of the fragment being removed or detached.
 */
public static void replace(@NonNull final FragmentManager fm,
                           @NonNull final Fragment fragment,
                           @IdRes final int containerId,
                           @AnimatorRes @AnimRes final int enterAnim,
                           @AnimatorRes @AnimRes final int exitAnim) {
    replace(fm, fragment, containerId, null, false, enterAnim, exitAnim, 0, 0);
}
 
源代码29 项目: AndroidUtilCode   文件: FragmentUtils.java
/**
 * Replace fragment.
 *
 * @param fm          The manager of fragment.
 * @param containerId The id of container.
 * @param fragment    The new fragment to place in the container.
 * @param isAddStack  True to add fragment in stack, false otherwise.
 * @param enterAnim   An animation or animator resource ID used for the enter animation on the
 *                    view of the fragment being added or attached.
 * @param exitAnim    An animation or animator resource ID used for the exit animation on the
 *                    view of the fragment being removed or detached.
 */
public static void replace(@NonNull final FragmentManager fm,
                           @NonNull final Fragment fragment,
                           @IdRes final int containerId,
                           final boolean isAddStack,
                           @AnimatorRes @AnimRes final int enterAnim,
                           @AnimatorRes @AnimRes final int exitAnim) {
    replace(fm, fragment, containerId, null, isAddStack, enterAnim, exitAnim, 0, 0);
}
 
源代码30 项目: AndroidUtilCode   文件: FragmentUtils.java
/**
 * Replace fragment.
 *
 * @param fm           The manager of fragment.
 * @param containerId  The id of container.
 * @param fragment     The new fragment to place in the container.
 * @param enterAnim    An animation or animator resource ID used for the enter animation on the
 *                     view of the fragment being added or attached.
 * @param exitAnim     An animation or animator resource ID used for the exit animation on the
 *                     view of the fragment being removed or detached.
 * @param popEnterAnim An animation or animator resource ID used for the enter animation on the
 *                     view of the fragment being readded or reattached caused by
 *                     popBackStack() or similar methods.
 * @param popExitAnim  An animation or animator resource ID used for the enter animation on the
 *                     view of the fragment being removed or detached caused by
 *                     popBackStack() or similar methods.
 */
public static void replace(@NonNull final FragmentManager fm,
                           @NonNull final Fragment fragment,
                           @IdRes final int containerId,
                           @AnimatorRes @AnimRes final int enterAnim,
                           @AnimatorRes @AnimRes final int exitAnim,
                           @AnimatorRes @AnimRes final int popEnterAnim,
                           @AnimatorRes @AnimRes final int popExitAnim) {
    replace(fm, fragment, containerId, null, false,
            enterAnim, exitAnim, popEnterAnim, popExitAnim);
}
 
如果文章对您有帮助,请点击页面广告。以鼓励作者做出的努力。
 同包方法