Ejemplo n.º 1
0
            public void Run()
            {
                float             centerX = container.Width / 2.0f;
                float             centerY = container.Height / 2.0f;
                Rotate3dAnimation rotation;

                if (position > -1)
                {
                    photos_list.Visibility = ViewStates.Gone;
                    image_view.Visibility  = ViewStates.Visible;
                    image_view.RequestFocus();

                    rotation = new Rotate3dAnimation(90, 180, centerX, centerY, 310.0f, false);
                }
                else
                {
                    image_view.Visibility  = ViewStates.Gone;
                    photos_list.Visibility = ViewStates.Visible;
                    photos_list.RequestFocus();

                    rotation = new Rotate3dAnimation(90, 0, centerX, centerY, 310.0f, false);
                }

                rotation.Duration     = 500;
                rotation.FillAfter    = true;
                rotation.Interpolator = new DecelerateInterpolator();

                container.StartAnimation(rotation);
            }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
            public void Run()
            {
                float centerX = container.Width / 2.0f;
                float centerY = container.Height / 2.0f;
                Rotate3dAnimation rotation;

                if (position > -1) {
                    photos_list.Visibility = ViewStates.Gone;
                    image_view.Visibility = ViewStates.Visible;
                    image_view.RequestFocus ();

                    rotation = new Rotate3dAnimation (90, 180, centerX, centerY, 310.0f, false);
                } else {
                    image_view.Visibility = ViewStates.Gone;
                    photos_list.Visibility = ViewStates.Visible;
                    photos_list.RequestFocus ();

                    rotation = new Rotate3dAnimation (90, 0, centerX, centerY, 310.0f, false);
                }

                rotation.Duration = 500;
                rotation.FillAfter = true;
                rotation.Interpolator = new DecelerateInterpolator ();

                container.StartAnimation (rotation);
            }
Ejemplo n.º 4
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);
        }