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


Java ViewPropertyAnimatorCompat.start方法代码示例

本文整理汇总了Java中android.support.v4.view.ViewPropertyAnimatorCompat.start方法的典型用法代码示例。如果您正苦于以下问题:Java ViewPropertyAnimatorCompat.start方法的具体用法?Java ViewPropertyAnimatorCompat.start怎么用?Java ViewPropertyAnimatorCompat.start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.v4.view.ViewPropertyAnimatorCompat的用法示例。


在下文中一共展示了ViewPropertyAnimatorCompat.start方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: show

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
/**
 * @param animate whether to animate the change
 * @return this, to allow builder pattern
 */
public T show(boolean animate) {
    mIsHidden = false;
    if (isWeakReferenceValid()) {
        TextView textView = mTextViewRef.get();
        if (animate) {
            textView.setScaleX(0);
            textView.setScaleY(0);
            textView.setVisibility(View.VISIBLE);
            ViewPropertyAnimatorCompat animatorCompat = ViewCompat.animate(textView);
            animatorCompat.cancel();
            animatorCompat.setDuration(mAnimationDuration);
            animatorCompat.scaleX(1).scaleY(1);
            animatorCompat.setListener(null);
            animatorCompat.start();
        } else {
            textView.setScaleX(1);
            textView.setScaleY(1);
            textView.setVisibility(View.VISIBLE);
        }
    }
    return getSubInstance();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:27,代码来源:BadgeItem.java

示例2: start

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
public void start() {
    if (!this.mIsStarted) {
        Iterator i$ = this.mAnimators.iterator();
        while (i$.hasNext()) {
            ViewPropertyAnimatorCompat animator = (ViewPropertyAnimatorCompat) i$.next();
            if (this.mDuration >= 0) {
                animator.setDuration(this.mDuration);
            }
            if (this.mInterpolator != null) {
                animator.setInterpolator(this.mInterpolator);
            }
            if (this.mListener != null) {
                animator.setListener(this.mProxyListener);
            }
            animator.start();
        }
        this.mIsStarted = true;
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:20,代码来源:ViewPropertyAnimatorCompatSet.java

示例3: animateToVisibility

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
public void animateToVisibility(int visibility) {
    if (this.mVisibilityAnim != null) {
        this.mVisibilityAnim.cancel();
    }
    if (visibility == 0) {
        if (getVisibility() != 0) {
            ViewCompat.setAlpha(this, 0.0f);
        }
        ViewPropertyAnimatorCompat anim = ViewCompat.animate(this).alpha(1.0f);
        anim.setDuration(200);
        anim.setInterpolator(sAlphaInterpolator);
        anim.setListener(this.mVisAnimListener.withFinalVisibility(anim, visibility));
        anim.start();
        return;
    }
    anim = ViewCompat.animate(this).alpha(0.0f);
    anim.setDuration(200);
    anim.setInterpolator(sAlphaInterpolator);
    anim.setListener(this.mVisAnimListener.withFinalVisibility(anim, visibility));
    anim.start();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:22,代码来源:ScrollingTabContainerView.java

示例4: createAnimatorToHeadView

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
public void createAnimatorToHeadView(final View v, final float angle)
{
    ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = ViewCompat.animate(v);
    viewPropertyAnimatorCompat.setDuration(200);
    viewPropertyAnimatorCompat.setInterpolator(new DecelerateInterpolator());
    viewPropertyAnimatorCompat.rotationX(90);
    viewPropertyAnimatorCompat.start();
    viewPropertyAnimatorCompat.setUpdateListener(new ViewPropertyAnimatorUpdateListener() {
        @Override
        public void onAnimationUpdate(View view) {
            float height = ViewCompat.getTranslationY(mChildView);
            mHeadLayout.setPivotX(mHeadLayout.getWidth() / 2);
            mHeadLayout.setPivotY(height);
        }
    });
}
 
开发者ID:zongkaili,项目名称:MenuSet,代码行数:17,代码来源:PerseiLayout.java

示例5: finishRefreshing

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
public void finishRefreshing() {
    if (mChildView != null) {
        ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = ViewCompat.animate(mChildView);
        viewPropertyAnimatorCompat.setDuration(200);
        viewPropertyAnimatorCompat.y(ViewCompat.getTranslationY(mChildView));
        viewPropertyAnimatorCompat.translationY(0);
        viewPropertyAnimatorCompat.setInterpolator(new DecelerateInterpolator());
        viewPropertyAnimatorCompat.start();

        if (mMaterialHeaderView != null) {
            mMaterialHeaderView.onComplete(MaterialRefreshLayout.this);
        } else if (mSunLayout != null) {
            mSunLayout.onComplete(MaterialRefreshLayout.this);
        }

        if (refreshListener != null) {
            refreshListener.onfinish();
        }
    }
    isRefreshing = false;
    progressValue = 0;
}
 
开发者ID:smuyyh,项目名称:SprintNBA,代码行数:23,代码来源:MaterialRefreshLayout.java

示例6: finishRefreshing

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
public void finishRefreshing() {
    if (mChildView != null) {
        ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = ViewCompat.animate(mChildView);
        viewPropertyAnimatorCompat.setDuration(200);
        viewPropertyAnimatorCompat.y(ViewCompat.getTranslationY(mChildView));
        viewPropertyAnimatorCompat.translationY(0);
        viewPropertyAnimatorCompat.setInterpolator(new DecelerateInterpolator());
        viewPropertyAnimatorCompat.start();

        if (materialHeadView != null) {
            materialHeadView.onComlete(MaterialRefreshLayout.this);
        }

        if (refreshListener != null) {
            refreshListener.onfinish();
        }
    }
    isRefreshing = false;
    progressValue = 0;
    setProgressValue(0);
}
 
开发者ID:duguju,项目名称:MousePaintYzz,代码行数:22,代码来源:MaterialRefreshLayout.java

示例7: finishRefreshing

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
public void finishRefreshing() {
    if (mChildView != null) {
        ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = ViewCompat.animate(mChildView);
        viewPropertyAnimatorCompat.setDuration(200);
        viewPropertyAnimatorCompat.y(ViewCompat.getTranslationY(mChildView));
        viewPropertyAnimatorCompat.translationY(0);
        viewPropertyAnimatorCompat.setInterpolator(new DecelerateInterpolator());
        viewPropertyAnimatorCompat.start();

        if (mMaterialHeaderView != null) {
            mMaterialHeaderView.onComlete(MaterialRefreshLayout.this);
        } else if (mSunLayout != null) {
            mSunLayout.onComlete(MaterialRefreshLayout.this);
        }

        if (refreshListener != null) {
            refreshListener.onfinish();
        }
    }
    isRefreshing = false;
    progressValue = 0;
}
 
开发者ID:bitkylin,项目名称:BitkyShop,代码行数:23,代码来源:MaterialRefreshLayout.java

示例8: start

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
public final void start()
{
  if (this.mIsStarted) {
    return;
  }
  Iterator localIterator = this.mAnimators.iterator();
  while (localIterator.hasNext())
  {
    ViewPropertyAnimatorCompat localViewPropertyAnimatorCompat = (ViewPropertyAnimatorCompat)localIterator.next();
    if (this.mDuration >= 0L) {
      localViewPropertyAnimatorCompat.setDuration(this.mDuration);
    }
    if (this.mInterpolator != null) {
      localViewPropertyAnimatorCompat.setInterpolator(this.mInterpolator);
    }
    if (this.mListener != null) {
      localViewPropertyAnimatorCompat.setListener(this.mProxyListener);
    }
    localViewPropertyAnimatorCompat.start();
  }
  this.mIsStarted = true;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:23,代码来源:ViewPropertyAnimatorCompatSet.java

示例9: finishRefreshing

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
public void finishRefreshing() {
    if (mChildView != null) {
        ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = ViewCompat.animate(mChildView);
        viewPropertyAnimatorCompat.setDuration(200);
        viewPropertyAnimatorCompat.y(ViewCompat.getTranslationY(mChildView));
        viewPropertyAnimatorCompat.translationY(0);
        viewPropertyAnimatorCompat.setInterpolator(new DecelerateInterpolator());
        viewPropertyAnimatorCompat.start();

        if (materialHeadView != null) {
            materialHeadView.onComlete(PulltoRefreshLayout.this);
        }

        if (refreshListener != null) {
            refreshListener.onfinish();
        }
    }
    isRefreshing = false;
    progressValue = 0;
    setProgressValue(0);
}
 
开发者ID:skyxin888,项目名称:PulltoRefreshLayout,代码行数:22,代码来源:PulltoRefreshLayout.java

示例10: show

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
/**
 * @param animate whether to animate the change
 * @return this, to allow builder pattern
 */
public BadgeItem show(boolean animate) {
    mIsHidden = false;
    if (isWeakReferenceValid()) {
        TextView textView = mTextViewRef.get();
        if (animate) {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
                textView.setScaleX(0);
                textView.setScaleY(0);
            }
            textView.setVisibility(View.VISIBLE);
            ViewPropertyAnimatorCompat animatorCompat = ViewCompat.animate(textView);
            animatorCompat.cancel();
            animatorCompat.setDuration(mAnimationDuration);
            animatorCompat.scaleX(1).scaleY(1);
            animatorCompat.setListener(null);
            animatorCompat.start();
        } else {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
                textView.setScaleX(1);
                textView.setScaleY(1);
            }
            textView.setVisibility(View.VISIBLE);
        }
    }
    return this;
}
 
开发者ID:liu-xiao-dong,项目名称:JD-Test,代码行数:31,代码来源:BadgeItem.java

示例11: onBindRadioGroupedViewHolder

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
@Override
public void onBindRadioGroupedViewHolder(SecondViewHolder holder, int position, List<Object> payloads) {
    {
        setDefaults(holder, position);
    }
    {
        MyPayload payload = null;

        for (Object itrPayload : payloads) {
            if (itrPayload != null && itrPayload instanceof MyPayload) {
                payload = (MyPayload) itrPayload;
                break;
            }
        }

        if (payload != null) {
            ViewPropertyAnimatorCompat animator = ViewCompat
                    .animate(holder.getIcon())
                    .setInterpolator(new LinearOutSlowInInterpolator())
                    .setDuration(500);

            int diff = payload.calcDiffY();

            if (diff == 0) {
                ViewCompat.setTranslationX(holder.getIcon(), holder.getIcon().getMeasuredWidth() * -1);
                animator = animator
                        .translationX(0);
            } else {
                ViewCompat.setTranslationY(holder.getIcon(), diff);
                animator = animator
                        .translationY(0);
            }

            animator.start();
        }
    }
}
 
开发者ID:S64,项目名称:android-radiobutton-extended,代码行数:38,代码来源:SecondAdapter.java

示例12: animateTitle

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
private void animateTitle(float finalScale, float finalAlpha) {
    if (type == Type.TABLET) {
        return;
    }

    ViewPropertyAnimatorCompat titleAnimator = ViewCompat.animate(titleView)
            .setDuration(ANIMATION_DURATION)
            .scaleX(finalScale)
            .scaleY(finalScale);
    titleAnimator.alpha(finalAlpha);
    titleAnimator.start();
}
 
开发者ID:A-Miracle,项目名称:QiangHongBao,代码行数:13,代码来源:BottomBarTab.java

示例13: createAnimatorTranslationY

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
public void createAnimatorTranslationY(final View v, final float h, final FrameLayout fl) {
    ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = ViewCompat.animate(v);
    viewPropertyAnimatorCompat.setDuration(200);
    viewPropertyAnimatorCompat.setInterpolator(new DecelerateInterpolator());
    viewPropertyAnimatorCompat.translationY(h);
    viewPropertyAnimatorCompat.start();
    viewPropertyAnimatorCompat.setUpdateListener(new ViewPropertyAnimatorUpdateListener() {
        @Override
        public void onAnimationUpdate(View view) {
            float height = ViewCompat.getTranslationY(v);
            fl.getLayoutParams().height = (int) height;
            fl.requestLayout();
        }
    });
}
 
开发者ID:zongkaili,项目名称:MenuSet,代码行数:16,代码来源:PerseiLayout.java

示例14: closeMenuing

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
private void closeMenuing() {
    if (mChildView != null) {
        ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = ViewCompat.animate(mChildView);
        viewPropertyAnimatorCompat.setDuration(200);
        viewPropertyAnimatorCompat.y(ViewCompat.getTranslationY(mChildView));
        viewPropertyAnimatorCompat.translationY(0);
        viewPropertyAnimatorCompat.setInterpolator(new DecelerateInterpolator());
        viewPropertyAnimatorCompat.start();
    }
    isOpenMenu = false;
}
 
开发者ID:zongkaili,项目名称:MenuSet,代码行数:12,代码来源:PerseiLayout.java

示例15: animateTitle

import android.support.v4.view.ViewPropertyAnimatorCompat; //导入方法依赖的package包/类
private void animateTitle(int padding, float scale, float alpha) {
    if (type == Type.TABLET && isTitleless) {
        return;
    }

    setTopPaddingAnimated(iconView.getPaddingTop(), padding);

    ViewPropertyAnimatorCompat titleAnimator = ViewCompat.animate(titleView)
            .setDuration(ANIMATION_DURATION)
            .scaleX(scale)
            .scaleY(scale);
    titleAnimator.alpha(alpha);
    titleAnimator.start();
}
 
开发者ID:roughike,项目名称:BottomBar,代码行数:15,代码来源:BottomBarTab.java


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