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


Java AnimUtils类代码示例

本文整理汇总了Java中io.plaidapp.util.AnimUtils的典型用法代码示例。如果您正苦于以下问题:Java AnimUtils类的具体用法?Java AnimUtils怎么用?Java AnimUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: onBackPressed

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
@Override
public void onBackPressed() {
    if (isShareIntent()) {
        bottomSheetContent.animate()
                .translationY(bottomSheetContent.getHeight())
                .setDuration(160L)
                .setInterpolator(AnimUtils.getFastOutLinearInInterpolator
                        (PostNewDesignerNewsStory.this))
                .setListener(new AnimatorListenerAdapter() {
                    @Override
                    public void onAnimationEnd(Animator animation) {
                        finishAfterTransition();
                    }
                });
    } else {
        super.onBackPressed();
    }
}
 
开发者ID:liulinbo,项目名称:Amumu,代码行数:19,代码来源:PostNewDesignerNewsStory.java

示例2: animateToolbar

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
private void animateToolbar() {
    // this is gross but toolbar doesn't expose it's children to animate them :(
    View t = toolbar.getChildAt(0);
    if (t != null && t instanceof TextView) {
        TextView title = (TextView) t;

        // fade in and space out the title.  Animating the letterSpacing performs horribly so
        // fake it by setting the desired letterSpacing then animating the scaleX ¯\_(ツ)_/¯
        title.setAlpha(0f);
        title.setScaleX(0.8f);

        title.animate()
                .alpha(1f)
                .scaleX(1f)
                .setStartDelay(300)
                .setDuration(900)
                .setInterpolator(AnimUtils.getFastOutSlowInInterpolator(this));
    }
    View amv = toolbar.getChildAt(1);
    if (amv != null & amv instanceof ActionMenuView) {
        ActionMenuView actions = (ActionMenuView) amv;
        popAnim(actions.getChildAt(0), 500, 200); // filter
        popAnim(actions.getChildAt(1), 700, 200); // overflow
    }
}
 
开发者ID:liulinbo,项目名称:Amumu,代码行数:26,代码来源:HomeActivity.java

示例3: onStopNestedScroll

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
@Override
public void onStopNestedScroll(View child) {
    if (Math.abs(totalDrag) >= dragDismissDistance) {
        dispatchDismissCallback();
    } else { // settle back to natural position
        animate()
                .translationY(0f)
                .scaleX(1f)
                .scaleY(1f)
                .setDuration(200L)
                .setInterpolator(AnimUtils.getFastOutSlowInInterpolator(getContext()))
                .setListener(null)
                .start();
        totalDrag = 0;
        draggingDown = draggingUp = false;
        dispatchDragCallback(0f, 0f, 0f, 0f);
    }
}
 
开发者ID:liulinbo,项目名称:Amumu,代码行数:19,代码来源:ElasticDragDismissFrameLayout.java

示例4: dismiss

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
@OnClick(R.id.bottom_sheet)
protected void dismiss() {
    if (!hasSharedElementTransition()) {
        bottomSheetContent.animate()
                .translationY(bottomSheetContent.getHeight())
                .setDuration(160L)
                .setInterpolator(AnimUtils.getFastOutLinearInInterpolator
                        (PostNewDesignerNewsStory.this))
                .setListener(new AnimatorListenerAdapter() {
                    @Override
                    public void onAnimationEnd(Animator animation) {
                        finish();
                    }
                });
    } else {
        finishAfterTransition();
    }
}
 
开发者ID:yongjhih,项目名称:android-proguards,代码行数:19,代码来源:PostNewDesignerNewsStory.java

示例5: revealPostingProgress

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
void revealPostingProgress() {
    Animator reveal = ViewAnimationUtils.createCircularReveal(fabPosting,
            (int) fabPosting.getPivotX(),
            (int) fabPosting.getPivotY(),
            0f,
            fabPosting.getWidth() / 2)
            .setDuration(600L);
    reveal.setInterpolator(AnimUtils.getFastOutLinearInInterpolator(this));
    reveal.start();
    AnimatedVectorDrawable uploading =
            (AnimatedVectorDrawable) getDrawable(R.drawable.avd_uploading);
    if (uploading != null) {
        fabPosting.setImageDrawable(uploading);
        uploading.start();
    }
}
 
开发者ID:yongjhih,项目名称:android-proguards,代码行数:17,代码来源:HomeActivity.java

示例6: animateToolbar

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
private void animateToolbar() {
    // this is gross but toolbar doesn't expose it's children to animate them :(
    View t = toolbar.getChildAt(0);
    if (t != null && t instanceof TextView) {
        TextView title = (TextView) t;

        // fade in and space out the title.  Animating the letterSpacing performs horribly so
        // fake it by setting the desired letterSpacing then animating the scaleX ¯\_(ツ)_/¯
        title.setAlpha(0f);
        title.setScaleX(0.8f);

        title.animate()
                .alpha(1f)
                .scaleX(1f)
                .setStartDelay(300)
                .setDuration(900)
                .setInterpolator(AnimUtils.getFastOutSlowInInterpolator(this));
    }
}
 
开发者ID:yongjhih,项目名称:android-proguards,代码行数:20,代码来源:HomeActivity.java

示例7: MaskMorphDrawable

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
MaskMorphDrawable(Context context, TextPaint textPaint,
                  int baseline, float charWidth, int insetStart) {
    this.insetStart = insetStart;
    this.baseline = baseline;
    this.charWidth = charWidth;
    paint = new TextPaint(textPaint);
    Rect maskBounds = new Rect();
    paint.getTextBounds(PASSWORD_MASK, 0, 1, maskBounds);
    maskDiameter = maskBounds.height();
    maskCenterY = (maskBounds.top + maskBounds.bottom) / 2f;
    showPasswordDuration =
            context.getResources().getInteger(R.integer.show_password_duration);
    hidePasswordDuration =
            context.getResources().getInteger(R.integer.hide_password_duration);
    fastOutSlowIn = AnimUtils.getFastOutSlowInInterpolator(context);
}
 
开发者ID:yongjhih,项目名称:android-proguards,代码行数:17,代码来源:PasswordEntry.java

示例8: getSettleInterpolator

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
/**
 * Provides the appropriate interpolator for the settle animation depending upon:
 * – If dismissing then exit at full speed i.e. linearly otherwise decelerate
 * – If have initial velocity then respect it (i.e. start linearly) otherwise accelerate into
 *   the animation.
 */
private TimeInterpolator getSettleInterpolator(boolean dismissing, float initialVelocity) {
    if (initialVelocity != 0) {
        if (dismissing) {
            return AnimUtils.getLinearInterpolator();
        } else {
            return AnimUtils.getLinearOutSlowInInterpolator(getContext());
        }
    } else {
        if (dismissing) {
            return AnimUtils.getFastOutLinearInInterpolator(getContext());
        } else {
            return AnimUtils.getFastOutSlowInInterpolator(getContext());
        }
    }
}
 
开发者ID:yongjhih,项目名称:android-proguards,代码行数:22,代码来源:BottomSheet.java

示例9: onAppear

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
@Override
public Animator onAppear(ViewGroup sceneRoot, View view, TransitionValues startValues,
                         TransitionValues endValues) {
    return new AnimUtils.NoPauseAnimator(ObjectAnimator.ofPropertyValuesHolder(
            endValues.view,
            PropertyValuesHolder.ofFloat(View.ALPHA, 0f, 1f),
            PropertyValuesHolder.ofFloat(View.SCALE_X, 0f, 1f),
            PropertyValuesHolder.ofFloat(View.SCALE_Y, 0f, 1f)));
}
 
开发者ID:liulinbo,项目名称:Amumu,代码行数:10,代码来源:Pop.java

示例10: onDisappear

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
@Override
public Animator onDisappear(ViewGroup sceneRoot, View view, TransitionValues startValues,
                            TransitionValues endValues) {
    return new AnimUtils.NoPauseAnimator(ObjectAnimator.ofPropertyValuesHolder(
            endValues.view,
            PropertyValuesHolder.ofFloat(View.ALPHA, 1f, 0f),
            PropertyValuesHolder.ofFloat(View.SCALE_X, 1f, 0f),
            PropertyValuesHolder.ofFloat(View.SCALE_Y, 1f, 0f)));
}
 
开发者ID:liulinbo,项目名称:Amumu,代码行数:10,代码来源:Pop.java

示例11: hideSaveConfimation

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
@OnClick(R.id.results_scrim)
protected void hideSaveConfimation() {
    if (confirmSaveContainer.getVisibility() == View.VISIBLE) {
        // contract the bubble & hide the scrim
        AnimatorSet hideConfirmation = new AnimatorSet();
        hideConfirmation.playTogether(
                ViewAnimationUtils.createCircularReveal(confirmSaveContainer,
                        confirmSaveContainer.getWidth() / 2,
                        confirmSaveContainer.getHeight() / 2,
                        confirmSaveContainer.getWidth() / 2,
                        fab.getWidth() / 2),
                ObjectAnimator.ofArgb(resultsScrim,
                        ViewUtils.BACKGROUND_COLOR,
                        Color.TRANSPARENT));
        hideConfirmation.setDuration(150L);
        hideConfirmation.setInterpolator(AnimUtils.getFastOutSlowInInterpolator
                (SearchActivity.this));
        hideConfirmation.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                confirmSaveContainer.setVisibility(View.GONE);
                resultsScrim.setVisibility(View.GONE);
                fab.setVisibility(results.getVisibility());
            }
        });
        hideConfirmation.start();
    }
}
 
开发者ID:liulinbo,项目名称:Amumu,代码行数:29,代码来源:SearchActivity.java

示例12: revealPostingProgress

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
private void revealPostingProgress() {
    Animator reveal = ViewAnimationUtils.createCircularReveal(fabPosting,
            (int) fabPosting.getPivotX(),
            (int) fabPosting.getPivotY(),
            0f,
            fabPosting.getWidth() / 2)
            .setDuration(600L);
    reveal.setInterpolator(AnimUtils.getFastOutLinearInInterpolator(this));
    reveal.start();
    AnimatedVectorDrawable uploading =
            (AnimatedVectorDrawable) getDrawable(R.drawable.avd_uploading);
    fabPosting.setImageDrawable(uploading);
    uploading.start();
}
 
开发者ID:liulinbo,项目名称:Amumu,代码行数:15,代码来源:HomeActivity.java

示例13: showFab

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
private void showFab() {
    fab.setAlpha(0f);
    fab.setScaleX(0f);
    fab.setScaleY(0f);
    fab.setTranslationY(fab.getHeight() / 2);
    fab.animate()
            .alpha(1f)
            .scaleX(1f)
            .scaleY(1f)
            .translationY(0f)
            .setDuration(300L)
            .setInterpolator(AnimUtils.getLinearOutSlowInInterpolator(this))
            .start();
}
 
开发者ID:liulinbo,项目名称:Amumu,代码行数:15,代码来源:HomeActivity.java

示例14: InkPageIndicator

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
public InkPageIndicator(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);

    final int density = (int) context.getResources().getDisplayMetrics().density;

    // Load attributes
    final TypedArray a = getContext().obtainStyledAttributes(
            attrs, R.styleable.InkPageIndicator, defStyle, 0);

    dotDiameter = a.getDimensionPixelSize(R.styleable.InkPageIndicator_dotDiameter,
            DEFAULT_DOT_SIZE * density);
    dotRadius = dotDiameter / 2;
    halfDotRadius = dotRadius / 2;
    gap = a.getDimensionPixelSize(R.styleable.InkPageIndicator_dotGap,
            DEFAULT_GAP * density);
    animDuration = (long) a.getInteger(R.styleable.InkPageIndicator_animationDuration,
            DEFAULT_ANIM_DURATION);
    animHalfDuration = animDuration / 2;
    unselectedColour = a.getColor( R.styleable.InkPageIndicator_pageIndicatorColor,
            DEFAULT_UNSELECTED_COLOUR);
    selectedColour = a.getColor( R.styleable.InkPageIndicator_currentPageIndicatorColor,
            DEFAULT_SELECTED_COLOUR);

    a.recycle();

    unselectedPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
    unselectedPaint.setColor(unselectedColour);
    selectedPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
    selectedPaint.setColor(selectedColour);
    interpolator = AnimUtils.getFastOutSlowInInterpolator(context);

    // create paths & rect now – reuse & rewind later
    combinedUnselectedPath = new Path();
    unselectedDotPath = new Path();
    unselectedDotLeftPath = new Path();
    unselectedDotRightPath = new Path();
    rectF = new RectF();

    addOnAttachStateChangeListener(this);
}
 
开发者ID:liulinbo,项目名称:Amumu,代码行数:41,代码来源:InkPageIndicator.java

示例15: onAppear

import io.plaidapp.util.AnimUtils; //导入依赖的package包/类
@Override
public Animator onAppear(ViewGroup sceneRoot, View view,
                         TransitionValues startValues,
                         TransitionValues endValues) {
    if (view == null || view.getHeight() == 0 || view.getWidth() == 0) return null;
    ensureCenterPoint(sceneRoot, view);
    return new AnimUtils.NoPauseAnimator(ViewAnimationUtils.createCircularReveal(
            view,
            center.x,
            center.y,
            startRadius,
            getFullyRevealedRadius(view)));
}
 
开发者ID:yongjhih,项目名称:android-proguards,代码行数:14,代码来源:CircularReveal.java


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