예제 #1
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: protected void animateMoveImpl(final android.support.v7.widget.RecyclerView.ViewHolder holder, int fromX, int fromY, int toX, int toY)
        protected internal virtual void animateMoveImpl(RecyclerView.ViewHolder holder, int fromX, int fromY, int toX, int toY)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.view.View view = holder.itemView;
            View view = holder.itemView;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int deltaX = toX - fromX;
            int deltaX = toX - fromX;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int deltaY = toY - fromY;
            int deltaY = toY - fromY;

            if (deltaX != 0)
            {
                ViewCompat.animate(view).translationX(0);
            }
            if (deltaY != 0)
            {
                ViewCompat.animate(view).translationY(0);
            }
            // TODO: make EndActions end listeners instead, since end actions aren't called when
            // vpas are canceled (and can't end them. why?)
            // need listener functionality in VPACompat for this. Ick.
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.support.v4.view.ViewPropertyAnimatorCompat animation = android.support.v4.view.ViewCompat.animate(view);
            ViewPropertyAnimatorCompat animation = ViewCompat.animate(view);

            mMoveAnimations.Add(holder);
            animation.setDuration(MoveDuration).setListener(new VpaListenerAdapterAnonymousInnerClassHelper3(this, holder, view, deltaX, deltaY, animation))
            .start();
        }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: protected void animateRemoveImpl(final android.support.v7.widget.RecyclerView.ViewHolder holder)
        protected internal virtual void animateRemoveImpl(RecyclerView.ViewHolder holder)
        {
            Log.d(TAG, "animateRemoveImpl(" + holder + ")");
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.view.View view = holder.itemView;
            View view = holder.itemView;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.support.v4.view.ViewPropertyAnimatorCompat animation = android.support.v4.view.ViewCompat.animate(view);
            ViewPropertyAnimatorCompat animation = ViewCompat.animate(view);

            mRemoveAnimations.Add(holder);
            animation.setDuration(RemoveDuration).alpha(0).setListener(new VpaListenerAdapterAnonymousInnerClassHelper(this, holder, view, animation))
            .start();
        }