Example #1
0
            public override void onAnimationUpdate(ValueAnimator animation)
            {
                float value = (float?)animation.AnimatedValue;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int curPos = (int)(fromDimension * value);
                int curPos = (int)(fromDimension * value);

                toHide.LayoutParams.width = curPos;
                toHide.requestLayout();
            }
Example #2
0
        protected internal override void applyTransformation(float interpolatedTime, Transformation t)
        {
            float        height = (mToHeight - mFromHeight) * interpolatedTime + mFromHeight;
            float        width  = (mToWidth - mFromWidth) * interpolatedTime + mFromWidth;
            LayoutParams p      = (LayoutParams)mView.LayoutParams;

            p.height = (int)height;
            p.width  = (int)width;
            this.endCondition(width, height);
            if (width == 0 && this.mToWidth == 0)
            {
                p.height = 0;
            }
            if (height == 0 && this.mToHeight == 0)
            {
                p.width = 0;
            }
            mView.requestLayout();
            mView.invalidate();
        }