android.support.annotation.AnimatorRes Java Examples

The following examples show how to use android.support.annotation.AnimatorRes. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: XERUNG   Author: mityung   File: CircleIndicator.java    License: Apache License 2.0 6 votes vote down vote up
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());
}
 
Example #2
Source Project: XERUNG   Author: mityung   File: CircleIndicator.java    License: Apache License 2.0 6 votes vote down vote up
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());
}
 
Example #3
Source Project: MNImageBrowser   Author: maning0303   File: CircleIndicator.java    License: GNU General Public License v3.0 6 votes vote down vote up
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());
}
 
Example #4
Source Project: Android-Application-ZJB   Author: pinguo-sunjianfei   File: CircleIndicator.java    License: Apache License 2.0 6 votes vote down vote up
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());
}
 
Example #5
Source Project: SuperIndicator   Author: smartyuge   File: CircleIndicator.java    License: Apache License 2.0 6 votes vote down vote up
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());
}
 
Example #6
Source Project: LefishGuide   Author: Haoxiqiang   File: CircleIndicator.java    License: Apache License 2.0 6 votes vote down vote up
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());
}
 
Example #7
Source Project: scene   Author: bytedance   File: PopOptions.java    License: Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example #8
Source Project: scene   Author: bytedance   File: PushOptions.java    License: Apache License 2.0 5 votes vote down vote up
@NonNull
public Builder setAnimation(@NonNull Activity activity,
                            @AnimRes @AnimatorRes int enterAnim,
                            @AnimRes @AnimatorRes int exitAnim) {
    this.mNavigationAnimationExecutor = new AnimationOrAnimatorResourceExecutor(activity, enterAnim, exitAnim);
    return this;
}
 
Example #9
Source Project: android_9.0.0_r45   Author: lulululbj   File: NavOptions.java    License: Apache License 2.0 5 votes vote down vote up
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;
}
 
Example #10
Source Project: recycler-fast-scroll   Author: FutureMind   File: CustomHandleBehavior.java    License: Apache License 2.0 5 votes vote down vote up
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);
    }
}
 
Example #11
Source Project: scene   Author: bytedance   File: AnimationOrAnimatorResourceExecutor.java    License: Apache License 2.0 4 votes vote down vote up
public AnimationOrAnimatorResourceExecutor(Activity activity, @AnimatorRes @AnimRes int enterResId, @AnimatorRes @AnimRes int exitResId) {
    mEnterAnimator = AnimationOrAnimator.loadAnimation(activity, enterResId);
    mExitAnimator = AnimationOrAnimator.loadAnimation(activity, exitResId);
}
 
Example #12
Source Project: android_9.0.0_r45   Author: lulululbj   File: NavOptions.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * 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;
}
 
Example #13
Source Project: android_9.0.0_r45   Author: lulululbj   File: NavOptions.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * 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;
}
 
Example #14
Source Project: MvpRoute   Author: TLocation   File: FragmentUtils.java    License: Apache License 2.0 4 votes vote down vote up
public FragmentWrapper addAnimStart(@AnimRes @AnimatorRes int startAn) {
	transaction.setCustomAnimations(startAn, 0);
	return this;
}
 
Example #15
Source Project: MvpRoute   Author: TLocation   File: FragmentUtils.java    License: Apache License 2.0 4 votes vote down vote up
public FragmentWrapper addAnimEnd(@AnimRes @AnimatorRes int endAn) {
	transaction.setCustomAnimations(0, endAn);
	return this;
}
 
Example #16
Source Project: relight   Author: ittianyu   File: ChipWidget.java    License: Apache License 2.0 4 votes vote down vote up
public ChipWidget showMotionSpecResource(@AnimatorRes int id) {
    view.setShowMotionSpecResource(id);
    return self();
}
 
Example #17
Source Project: relight   Author: ittianyu   File: ChipWidget.java    License: Apache License 2.0 4 votes vote down vote up
public ChipWidget hideMotionSpecResource(@AnimatorRes int id) {
    view.setHideMotionSpecResource(id);
    return self();
}
 
Example #18
Source Project: CookieBar2   Author: AviranAbady   File: CookieBar.java    License: Apache License 2.0 4 votes vote down vote up
public Builder setIconAnimation(@AnimatorRes int iconAnimation) {
    params.iconAnimator = (AnimatorSet) AnimatorInflater.loadAnimator(context, iconAnimation);
    return this;
}
 
Example #19
Source Project: LoadingLayout   Author: xiong-it   File: LoadingLayout.java    License: Apache License 2.0 4 votes vote down vote up
public void setLoadingAnim(@AnimatorRes int animId) {
    mLoadingAnim = AnimatorInflater.loadAnimator(getContext(), animId);
}
 
Example #20
Source Project: recycler-fast-scroll   Author: FutureMind   File: CustomHandleBehavior.java    License: Apache License 2.0 4 votes vote down vote up
public Builder withGrabAnimator(@AnimatorRes int grabAnimator) {
    this.grabAnimator = grabAnimator;
    return this;
}
 
Example #21
Source Project: recycler-fast-scroll   Author: FutureMind   File: CustomHandleBehavior.java    License: Apache License 2.0 4 votes vote down vote up
public Builder withReleaseAnimator(@AnimatorRes int releaseAnimator) {
    this.releaseAnimator = releaseAnimator;
    return this;
}
 
Example #22
Source Project: recycler-fast-scroll   Author: FutureMind   File: VisibilityAnimationManager.java    License: Apache License 2.0 4 votes vote down vote up
public AbsBuilder<T> withShowAnimator(@AnimatorRes int showAnimatorResource){
    this.showAnimatorResource = showAnimatorResource;
    return this;
}
 
Example #23
Source Project: recycler-fast-scroll   Author: FutureMind   File: VisibilityAnimationManager.java    License: Apache License 2.0 4 votes vote down vote up
public AbsBuilder<T> withHideAnimator(@AnimatorRes int hideAnimatorResource){
    this.hideAnimatorResource = hideAnimatorResource;
    return this;
}
 
Example #24
Source Project: AndroidUtilCode   Author: Blankj   File: FragmentUtils.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}
 
Example #25
Source Project: AndroidUtilCode   Author: Blankj   File: FragmentUtils.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}
 
Example #26
Source Project: AndroidUtilCode   Author: Blankj   File: FragmentUtils.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}
 
Example #27
Source Project: AndroidUtilCode   Author: Blankj   File: FragmentUtils.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}
 
Example #28
Source Project: AndroidUtilCode   Author: Blankj   File: FragmentUtils.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}
 
Example #29
Source Project: AndroidUtilCode   Author: Blankj   File: FragmentUtils.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}
 
Example #30
Source Project: AndroidUtilCode   Author: Blankj   File: FragmentUtils.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}