android.view.animation.LinearInterpolator Java Examples
The following examples show how to use
android.view.animation.LinearInterpolator.
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 File: Case1Scene.java From scene with Apache License 2.0 | 7 votes |
@NonNull @Override protected Animator onPopAnimator(final AnimationInfo fromInfo, final AnimationInfo toInfo) { final View toView = toInfo.mSceneView; final View fromView = fromInfo.mSceneView; ValueAnimator fromAlphaAnimator = ObjectAnimator.ofFloat(fromView, View.ALPHA, 1.0f, 0.0f); fromAlphaAnimator.setInterpolator(new LinearInterpolator()); fromAlphaAnimator.setDuration(150 * 20); fromAlphaAnimator.setStartDelay(50 * 20); ValueAnimator fromTranslateAnimator = ObjectAnimator.ofFloat(fromView, View.TRANSLATION_Y, 0, 0.08f * toView.getHeight()); fromTranslateAnimator.setInterpolator(new AccelerateInterpolator(2)); fromTranslateAnimator.setDuration(200 * 20); ValueAnimator toAlphaAnimator = ObjectAnimator.ofFloat(toView, View.ALPHA, 0.7f, 1.0f); toAlphaAnimator.setInterpolator(new LinearOutSlowInInterpolator()); toAlphaAnimator.setDuration(20 * 20); return TransitionUtils.mergeAnimators(fromAlphaAnimator, fromTranslateAnimator, toAlphaAnimator); }
Example #2
Source File: CameraXVideoCaptureHelper.java From mollyim-android with GNU General Public License v3.0 | 6 votes |
CameraXVideoCaptureHelper(@NonNull Fragment fragment, @NonNull CameraButtonView captureButton, @NonNull CameraXView camera, @NonNull MemoryFileDescriptor memoryFileDescriptor, int maxVideoDurationSec, @NonNull Callback callback) { this.fragment = fragment; this.camera = camera; this.memoryFileDescriptor = memoryFileDescriptor; this.callback = callback; this.updateProgressAnimator = ValueAnimator.ofFloat(0f, 1f).setDuration(maxVideoDurationSec * 1000); updateProgressAnimator.setInterpolator(new LinearInterpolator()); updateProgressAnimator.addUpdateListener(anim -> captureButton.setProgress(anim.getAnimatedFraction())); updateProgressAnimator.addListener(new AnimationEndCallback() { @Override public void onAnimationEnd(Animator animation) { if (isRecording) onVideoCaptureComplete(); } }); }
Example #3
Source File: MultiBlurActivity.java From HokoBlur with Apache License 2.0 | 6 votes |
private void setImage(@DrawableRes final int id) { mImageView.setImageResource(id); mDispatcher.submit(() -> { mInBitmap = BitmapFactory.decodeResource(getResources(), id); runOnUiThread(() -> { endAnimators(); mAnimator = ValueAnimator.ofInt(0, (int) (mRadius / 25f * 1000)); mAnimator.setInterpolator(new LinearInterpolator()); mAnimator.addUpdateListener(animation -> { mSeekBar.setProgress((Integer) animation.getAnimatedValue()); updateImage((int) ((Integer) animation.getAnimatedValue() / 1000f * 25f)); }); mAnimator.setDuration(300); mAnimator.start(); }); }); }
Example #4
Source File: TrimmerActivity.java From SimpleVideoEdit with Apache License 2.0 | 6 votes |
private void anim() { Log.d(TAG, "--anim--onProgressUpdate---->>>>>>>" + mPlayer.getCurrentPosition()); if (positionIcon.getVisibility() == View.GONE) { positionIcon.setVisibility(View.VISIBLE); } final RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) positionIcon.getLayoutParams(); int start = (int) (UIUtil.dip2px(this, INIT_THUMBVIEW_GAP) + (mStartPositionMs/*mVideoView.getCurrentPosition()*/ - scrolledMs) * pxPerMs); int end = (int) (UIUtil.dip2px(this, INIT_THUMBVIEW_GAP) + (mEndPositionMs - scrolledMs) * pxPerMs); animator = ValueAnimator .ofInt(start, end) .setDuration((mEndPositionMs - scrolledMs) - (mStartPositionMs/*mVideoView.getCurrentPosition()*/ - scrolledMs)); animator.setInterpolator(new LinearInterpolator()); animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { params.leftMargin = (int) animation.getAnimatedValue(); positionIcon.setLayoutParams(params); } }); animator.start(); }
Example #5
Source File: SmoothCheckBox.java From MyBookshelf with GNU General Public License v3.0 | 6 votes |
private void startCheckedAnimation() { ValueAnimator animator = ValueAnimator.ofFloat(1.0f, 0f); animator.setDuration(mAnimDuration / 3 * 2); animator.setInterpolator(new LinearInterpolator()); animator.addUpdateListener(animation -> { mScaleVal = (float) animation.getAnimatedValue(); mFloorColor = getGradientColor(mUnCheckedColor, mCheckedColor, 1 - mScaleVal); postInvalidate(); }); animator.start(); ValueAnimator floorAnimator = ValueAnimator.ofFloat(1.0f, 0.8f, 1.0f); floorAnimator.setDuration(mAnimDuration); floorAnimator.setInterpolator(new LinearInterpolator()); floorAnimator.addUpdateListener(animation -> { mFloorScale = (float) animation.getAnimatedValue(); postInvalidate(); }); floorAnimator.start(); drawTickDelayed(); }
Example #6
Source File: SVGBgView.java From WanAndroid with Apache License 2.0 | 6 votes |
private void init() { mPathDataList = new ArrayList<>(); mSvgRealSize = new RectF(); mSvgPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mValueAnimator = ValueAnimator.ofFloat(0); mValueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { mCurPathDataIndex = (float) animation.getAnimatedValue(); postInvalidate(); } }); mValueAnimator.setInterpolator(new LinearInterpolator()); mValueAnimator.setDuration(ANIM_TIME); new ParserThread().start(); }
Example #7
Source File: CalendarLayout.java From ShizuruNotes with Apache License 2.0 | 6 votes |
/** * 隐藏内容布局 */ @SuppressLint("NewApi") final void hideContentView() { if (mContentView == null) return; mContentView.animate() .translationY(getHeight() - mMonthView.getHeight()) .setDuration(220) .setInterpolator(new LinearInterpolator()) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { super.onAnimationEnd(animation); mContentView.setVisibility(INVISIBLE); mContentView.clearAnimation(); } }); }
Example #8
Source File: SmoothCheckBox.java From a with GNU General Public License v3.0 | 6 votes |
private void startUnCheckedAnimation() { ValueAnimator animator = ValueAnimator.ofFloat(0f, 1.0f); animator.setDuration(mAnimDuration); animator.setInterpolator(new LinearInterpolator()); animator.addUpdateListener(animation -> { mScaleVal = (float) animation.getAnimatedValue(); mFloorColor = getGradientColor(mCheckedColor, mFloorUnCheckedColor, mScaleVal); postInvalidate(); }); animator.start(); ValueAnimator floorAnimator = ValueAnimator.ofFloat(1.0f, 0.8f, 1.0f); floorAnimator.setDuration(mAnimDuration); floorAnimator.setInterpolator(new LinearInterpolator()); floorAnimator.addUpdateListener(animation -> { mFloorScale = (float) animation.getAnimatedValue(); postInvalidate(); }); floorAnimator.start(); }
Example #9
Source File: PullToRefreshView.java From wallpaper with GNU General Public License v2.0 | 6 votes |
/** * init * * @description * @param context * hylin 2012-7-26上午10:08:33 */ private void init() { // Load all of the animations we need in code rather than through XML mFlipAnimation = new RotateAnimation(0, -180, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f); mFlipAnimation.setInterpolator(new LinearInterpolator()); mFlipAnimation.setDuration(250); mFlipAnimation.setFillAfter(true); mReverseFlipAnimation = new RotateAnimation(-180, 0, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f); mReverseFlipAnimation.setInterpolator(new LinearInterpolator()); mReverseFlipAnimation.setDuration(250); mReverseFlipAnimation.setFillAfter(true); mInflater = LayoutInflater.from(getContext()); // header view 在此添加,保证是第一个添加到linearlayout的最上端 addHeaderView(); }
Example #10
Source File: BaseAction.java From FlowHelper with Apache License 2.0 | 6 votes |
/** * 放大缩小效果 */ public void autoScaleView() { if (mParentView != null && mIsAutoScale && mScaleFactor > 1) { View lastView = mParentView.getChildAt(mLastIndex); View curView = mParentView.getChildAt(mCurrentIndex); if (lastView != null && curView != null) { lastView.animate() .scaleX(1) .scaleY(1) .setDuration(mAnimTime) .setInterpolator(new LinearInterpolator()) .start(); curView.animate() .scaleX(mScaleFactor) .scaleY(mScaleFactor) .setDuration(mAnimTime) .setInterpolator(new LinearInterpolator()) .start(); } } }
Example #11
Source File: ArcLayout.java From timecat with Apache License 2.0 | 6 votes |
/** * 收缩动画 */ private static Animation createShrinkAnimation(float fromXDelta, float toXDelta, float fromYDelta, float toYDelta, long startOffset, long duration, Interpolator interpolator) { AnimationSet animationSet = new AnimationSet(false); animationSet.setFillAfter(true); //收缩过程中,child 逆时针自旋转360度 final long preDuration = duration / 2; Animation rotateAnimation = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); rotateAnimation.setStartOffset(startOffset); rotateAnimation.setDuration(preDuration); rotateAnimation.setInterpolator(new LinearInterpolator()); rotateAnimation.setFillAfter(true); animationSet.addAnimation(rotateAnimation); //收缩过程中位移,并逆时针旋转360度 Animation translateAnimation = new RotateAndTranslateAnimation(0, toXDelta, 0, toYDelta, 360, 720); translateAnimation.setStartOffset(startOffset + preDuration); translateAnimation.setDuration(duration - preDuration); translateAnimation.setInterpolator(interpolator); translateAnimation.setFillAfter(true); animationSet.addAnimation(translateAnimation); return animationSet; }
Example #12
Source File: YCLrcCustomView.java From YCAudioPlayer with Apache License 2.0 | 6 votes |
private void scrollTo(int line, long duration) { float offset = getOffset(line); endAnimation(); mAnimator = ValueAnimator.ofFloat(mOffset, offset); mAnimator.setDuration(duration); mAnimator.setInterpolator(new LinearInterpolator()); mAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { mOffset = (float) animation.getAnimatedValue(); invalidate(); } }); mAnimator.start(); }
Example #13
Source File: Android8DefaultSceneAnimatorExecutor.java From scene with Apache License 2.0 | 6 votes |
@NonNull @Override protected Animator onPopAnimator(final AnimationInfo fromInfo, final AnimationInfo toInfo) { if (fromInfo.mIsTranslucent) { return mDialogSceneAnimatorExecutor.onPopAnimator(fromInfo, toInfo); } final View toView = toInfo.mSceneView; final View fromView = fromInfo.mSceneView; ValueAnimator fromAlphaAnimator = ObjectAnimator.ofFloat(fromView, View.ALPHA, 1.0f, 0.0f); fromAlphaAnimator.setInterpolator(new LinearInterpolator()); fromAlphaAnimator.setDuration(150); fromAlphaAnimator.setStartDelay(50); ValueAnimator fromTranslateAnimator = ObjectAnimator.ofFloat(fromView, View.TRANSLATION_Y, 0, 0.08f * toView.getHeight()); fromTranslateAnimator.setInterpolator(new AccelerateInterpolator(2)); fromTranslateAnimator.setDuration(200); ValueAnimator toAlphaAnimator = ObjectAnimator.ofFloat(toView, View.ALPHA, 0.7f, 1.0f); toAlphaAnimator.setInterpolator(new LinearOutSlowInInterpolator()); toAlphaAnimator.setDuration(200); return TransitionUtils.mergeAnimators(fromAlphaAnimator, fromTranslateAnimator, toAlphaAnimator); }
Example #14
Source File: LessonB.java From SchoolQuest with GNU General Public License v3.0 | 6 votes |
public void setUpSliderAnimation() { GameActivity gameActivity = GameActivity.getInstance(); ImageView slider = gameActivity.findViewById(R.id.lesson_b_craft_bar_slider); ImageView craftBar = gameActivity.findViewById(R.id.lesson_b_craft_bar); int craftBarWidth = craftBar.getDrawable().getIntrinsicWidth(); ObjectAnimator sliderAnimation = ObjectAnimator.ofFloat(slider, "translationX", -(craftBarWidth / 2) + (craftBarWidth / 27), (craftBarWidth / 2) - (craftBarWidth / 27)); int baseSliderTime = 250; sliderAnimation.setDuration(baseSliderTime + (attn * baseSliderTime)); sliderAnimation.setRepeatCount(-1); sliderAnimation.setRepeatMode(ValueAnimator.REVERSE); sliderAnimation.setInterpolator(new LinearInterpolator()); sliderAnimation.start(); }
Example #15
Source File: RotateLoading.java From In77Camera with MIT License | 5 votes |
private void startAnimator() { ObjectAnimator scaleXAnimator = ObjectAnimator.ofFloat(this, "scaleX", 0.0f, 1); ObjectAnimator scaleYAnimator = ObjectAnimator.ofFloat(this, "scaleY", 0.0f, 1); scaleXAnimator.setDuration(300); scaleXAnimator.setInterpolator(new LinearInterpolator()); scaleYAnimator.setDuration(300); scaleYAnimator.setInterpolator(new LinearInterpolator()); AnimatorSet animatorSet = new AnimatorSet(); animatorSet.playTogether(scaleXAnimator, scaleYAnimator); animatorSet.start(); }
Example #16
Source File: ToggleButton.java From Common with Apache License 2.0 | 5 votes |
private void init(Context context) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { setLayerType(LAYER_TYPE_SOFTWARE, null); // Disable hardware acceleration } mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mRect = new Rect(); mRectF = new RectF(); mPaintThumb = new Paint(Paint.ANTI_ALIAS_FLAG); mPaintThumb.setColor(mColorThumb); mPaintTrack = new Paint(Paint.ANTI_ALIAS_FLAG); mPaintTrack.setColor(mColorTrackOff); mPaintPadding = new Paint(Paint.ANTI_ALIAS_FLAG); mPaintPadding.setColor(mColorPadding); mPaintShader = new Paint(Paint.ANTI_ALIAS_FLAG); mPaintShader.setColor(mColorThumb); mPaintShader.setShadowLayer(mPadding * 2, 0, 0, mColorPadding); mAnimation = ValueAnimator.ofFloat(0f, 1f); mAnimation.setDuration(mDuration); mAnimation.setInterpolator(new LinearInterpolator()); mAnimation.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { mFactor = (float) animation.getAnimatedValue(); // 更新进度因子 invalidate(); } }); }
Example #17
Source File: TransactionHistoryFragment.java From guarda-android-wallets with GNU General Public License v3.0 | 5 votes |
private void initRotation(ImageView ivLoader) { if (loaderAnimation == null) { loaderAnimation = ObjectAnimator.ofFloat(ivLoader, "rotation", 0.0f, 360f); loaderAnimation.setDuration(1500); loaderAnimation.setRepeatCount(ObjectAnimator.INFINITE); loaderAnimation.setInterpolator(new LinearInterpolator()); loaderAnimation.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { super.onAnimationCancel(animation); tvUpdateTransactions.setClickable(true); } }); } }
Example #18
Source File: TransactionHistoryFragment.java From guarda-android-wallets with GNU General Public License v3.0 | 5 votes |
private void initRotation(ImageView ivLoader) { if (loaderAnimation == null) { loaderAnimation = ObjectAnimator.ofFloat(ivLoader, "rotation", 0.0f, 360f); loaderAnimation.setDuration(1500); loaderAnimation.setRepeatCount(ObjectAnimator.INFINITE); loaderAnimation.setInterpolator(new LinearInterpolator()); loaderAnimation.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { super.onAnimationCancel(animation); tvUpdateTransactions.setClickable(true); } }); } }
Example #19
Source File: SosActivity.java From NaviBee with GNU General Public License v3.0 | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sos); // If activity is called by fall detection boolean isDetected = getIntent().getBooleanExtra("fall_detection", false); if (isDetected) { TextView textView = findViewById(R.id.sos_countdown_pre_text); textView.setText(R.string.sos_pre_text); } checkPhoneCallPermission(); mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this); countDownView = findViewById(R.id.sos_progress); countDownText = findViewById(R.id.sos_progress_text); countDownView.setMax(10 * 1000); countDownView.setProgress(10 * 1000); countDownView.setAnimationInterpolator(new LinearInterpolator()); countDownTimer = new CountDownTimer(10 * 1000, 1000) { @SuppressLint("SetTextI18n") @Override public void onTick(long l) { countDownText.setText(Long.toString(l / 1000 + 1)); countDownView.setProgress(l, true, 1000); } @Override public void onFinish() { triggerSOS(); } }; countDownTimer.start(); }
Example #20
Source File: TransHistoryAdapter.java From guarda-android-wallets with GNU General Public License v3.0 | 5 votes |
private void startClockwiseRotation(ImageView ivLoader) { loaderAnimation = ObjectAnimator.ofFloat(ivLoader, "rotation", 0.0f, 360f); loaderAnimation.setDuration(1500); loaderAnimation.setRepeatCount(ObjectAnimator.INFINITE); loaderAnimation.setInterpolator(new LinearInterpolator()); loaderAnimation.start(); }
Example #21
Source File: TransHistoryAdapter.java From guarda-android-wallets with GNU General Public License v3.0 | 5 votes |
private void startCounterclockwiseRotation(ImageView ivLoader) { loaderAnimation = ObjectAnimator.ofFloat(ivLoader, "rotation", 360f, 0.0f); loaderAnimation.setDuration(1500); loaderAnimation.setRepeatCount(ObjectAnimator.INFINITE); loaderAnimation.setInterpolator(new LinearInterpolator()); loaderAnimation.start(); }
Example #22
Source File: TransHistoryAdapter.java From guarda-android-wallets with GNU General Public License v3.0 | 5 votes |
private void startCounterclockwiseRotation(ImageView ivLoader) { loaderAnimation = ObjectAnimator.ofFloat(ivLoader, "rotation", 360f, 0.0f); loaderAnimation.setDuration(1500); loaderAnimation.setRepeatCount(ObjectAnimator.INFINITE); loaderAnimation.setInterpolator(new LinearInterpolator()); loaderAnimation.start(); }
Example #23
Source File: MiniGame.java From SchoolQuest with GNU General Public License v3.0 | 5 votes |
void setUpTextBoxArrowAnimation(ImageView textboxArrow) { TranslateAnimation textBoxArrowAnimation = new TranslateAnimation( TranslateAnimation.ABSOLUTE, 0f, TranslateAnimation.ABSOLUTE, 0f, TranslateAnimation.RELATIVE_TO_PARENT, 0f, TranslateAnimation.RELATIVE_TO_PARENT, 0.01f); textBoxArrowAnimation.setDuration(500); textBoxArrowAnimation.setRepeatCount(-1); textBoxArrowAnimation.setRepeatMode(Animation.RESTART); textBoxArrowAnimation.setInterpolator(new LinearInterpolator()); textBoxArrowAnimation.setFillAfter(true); textboxArrow.setAnimation(textBoxArrowAnimation); }
Example #24
Source File: FloatView.java From RePlugin-GameSdk with Apache License 2.0 | 5 votes |
public void show() { if (getVisibility() != View.VISIBLE) { setVisibility(View.VISIBLE); if (mShowLoader) { mIvFloatLogo.setImageResource(RUtils.drawable(RePlugin.getPluginContext(), "fun_default_icon")); mWmParams.alpha = 1.0F; mWindowManager.updateViewLayout(this, mWmParams); timerForHide(); mShowLoader = false; Animation rotaAnimation = AnimationUtils.loadAnimation(RePlugin.getPluginContext(), RUtils.anim(RePlugin.getPluginContext(), "raink_loading_anim")); rotaAnimation.setInterpolator(new LinearInterpolator()); mIvFloatLoader.startAnimation(rotaAnimation); mTimer.schedule(new TimerTask() { public void run() { mTimerHandler.sendEmptyMessage(HANDLER_TYPE_CANCEL_ANIM); } }, 3000L); } } }
Example #25
Source File: AudioPlayingButton.java From HaoReader with GNU General Public License v3.0 | 5 votes |
public void start() { if (getVisibility() != VISIBLE) return; if (animator == null) { animator = ValueAnimator.ofFloat(0f, 360f); animator.addUpdateListener(animation -> ivCover.setRotation((Float) animation.getAnimatedValue())); animator.setDuration(10000); animator.setInterpolator(new LinearInterpolator()); animator.setRepeatCount(ValueAnimator.INFINITE); animator.setStartDelay(1000); animator.start(); } else { animator.resume(); } }
Example #26
Source File: GameActivity.java From SchoolQuest with GNU General Public License v3.0 | 5 votes |
private void setUpTextBoxArrowAnimation() { ImageView textBoxArrow = findViewById(R.id.textbox_box_arrow); TranslateAnimation textBoxArrowAnimation = new TranslateAnimation(TranslateAnimation.ABSOLUTE, 0f, TranslateAnimation.ABSOLUTE, 0f, TranslateAnimation.RELATIVE_TO_PARENT, 0f, TranslateAnimation.RELATIVE_TO_PARENT, 0.01f); textBoxArrowAnimation.setDuration(500); textBoxArrowAnimation.setRepeatCount(-1); textBoxArrowAnimation.setRepeatMode(Animation.RESTART); textBoxArrowAnimation.setInterpolator(new LinearInterpolator()); textBoxArrowAnimation.setFillAfter(true); textBoxArrow.setAnimation(textBoxArrowAnimation); }
Example #27
Source File: TransHistoryAdapter.java From guarda-android-wallets with GNU General Public License v3.0 | 5 votes |
private void startClockwiseRotation(ImageView ivLoader) { loaderAnimation = ObjectAnimator.ofFloat(ivLoader, "rotation", 0.0f, 360f); loaderAnimation.setDuration(1500); loaderAnimation.setRepeatCount(ObjectAnimator.INFINITE); loaderAnimation.setInterpolator(new LinearInterpolator()); loaderAnimation.start(); }
Example #28
Source File: TransHistoryAdapter.java From guarda-android-wallets with GNU General Public License v3.0 | 5 votes |
private void startCounterclockwiseRotation(ImageView ivLoader) { loaderAnimation = ObjectAnimator.ofFloat(ivLoader, "rotation", 360f, 0.0f); loaderAnimation.setDuration(1500); loaderAnimation.setRepeatCount(ObjectAnimator.INFINITE); loaderAnimation.setInterpolator(new LinearInterpolator()); loaderAnimation.start(); }
Example #29
Source File: CountDownView.java From NoVIP with Apache License 2.0 | 5 votes |
private ValueAnimator getValA(long countdownTime) { ValueAnimator valueAnimator = ValueAnimator.ofFloat(0, 100); valueAnimator.setDuration(countdownTime); valueAnimator.setInterpolator(new LinearInterpolator()); valueAnimator.setRepeatCount(0); return valueAnimator; }
Example #30
Source File: TransHistoryAdapter.java From guarda-android-wallets with GNU General Public License v3.0 | 5 votes |
private void startCounterclockwiseRotation(ImageView ivLoader) { loaderAnimation = ObjectAnimator.ofFloat(ivLoader, "rotation", 360f, 0.0f); loaderAnimation.setDuration(1500); loaderAnimation.setRepeatCount(ObjectAnimator.INFINITE); loaderAnimation.setInterpolator(new LinearInterpolator()); loaderAnimation.start(); }