Пример #1
0
        /**
         * Setup a new 3D rotation on the container view.
         *
         * @param position the item that was clicked to show a picture, or -1 to show the list
         * @param start the start angle at which the rotation must begin
         * @param end the end angle of the rotation
         */
        private void ApplyRotation(int position, float start, float end)
        {
            // Find the center of the container
            float centerX = mContainer.Width / 2.0f;
            float centerY = mContainer.Height / 2.0f;

            // Create a new 3D rotation with the supplied parameter
            // The animation listener is used to trigger the next animation
            Rotate3dAnimation rotation =
                new Rotate3dAnimation(start, end, centerX, centerY, 310.0f, true);

            rotation.Duration     = 500;
            rotation.FillAfter    = true;
            rotation.Interpolator = new AccelerateInterpolator();
            rotation.SetAnimationListener(new DisplayNextView(position, mContainer, mPhotosList, mImageView));

            mContainer.StartAnimation(rotation);
        }
Пример #2
0
        /**
         * Setup a new 3D rotation on the container view.
         *
         * @param position the item that was clicked to show a picture, or -1 to show the list
         * @param start the start angle at which the rotation must begin
         * @param end the end angle of the rotation
         */
        private void ApplyRotation(int position, float start, float end)
        {
            // Find the center of the container
            float centerX = mContainer.Width / 2.0f;
            float centerY = mContainer.Height / 2.0f;

            // Create a new 3D rotation with the supplied parameter
            // The animation listener is used to trigger the next animation
            Rotate3dAnimation rotation =
                new Rotate3dAnimation (start, end, centerX, centerY, 310.0f, true);
            rotation.Duration = 500;
            rotation.FillAfter = true;
            rotation.Interpolator = new AccelerateInterpolator ();
            rotation.SetAnimationListener (new DisplayNextView (position, mContainer, mPhotosList, mImageView));

            mContainer.StartAnimation (rotation);
        }