예제 #1
0
        internal void NextPage(bool isEndEffect = true, AnimationManager.PageAnimationType type = AnimationManager.PageAnimationType.Slide)
        {
            if (animationManager.IsAnimating)
            {
                return;
            }
            animationManager.IsAnimating = true;

            if (currentPage + 1 < lastPage)
            {
                //For editing mode
                rotaryLayerView.CheckEditBG(currentPage + 1, lastPage);
                rotaryLayerView.AnimateBG(true);


                PlayPageAnimation(rotaryLayerView.RotaryItemList, currentPage + 1, false, type);
                currentPage++;
                pagination.SetCurrentPage(currentPage);
            }
            else
            {
                if (isEndEffect)
                {
                    animationManager.AnimateEndEffect(rotaryLayerView.GetContainer());
                }
            }
        }
예제 #2
0
        internal void NextPage(bool isEndEffect = true, AnimationManager.PageAnimationType type = AnimationManager.PageAnimationType.Slide)
        {
            if (animationManager.IsAnimating)
            {
                return;
            }
            animationManager.IsAnimating = true;

            if (currentPage + 1 < lastPage)
            {
                //For editing mode
                rotaryLayerView.CheckEditBG(currentPage + 1, lastPage);
                rotaryLayerView.AnimateBG(true);


                PlayPageAnimation(rotaryLayerView.RotaryItemList, currentPage + 1, false, type);


                currentPage++;
                pagination.SetCurrentPage(currentPage);

                int mod = rotaryLayerView.RotaryItemList.Count % ApplicationConstants.MAX_ITEM_COUNT;
                if (currentSelectIdx + 1 > mod && currentPage + 1 == lastPage)
                {
                    int lastIdx = currentPage * ApplicationConstants.MAX_ITEM_COUNT + mod;
                    SelectItem(rotaryLayerView.RotaryItemList[lastIdx - 1], false);
                    return;
                }
            }
            else
            {
                if (isEditMode)
                {
                    animationManager.IsAnimating = false;
                    return;
                }
                if (isEndEffect)
                {
                    animationManager.AnimateEndEffect(rotaryLayerView.GetContainer());
                    return;
                }
            }

            int selIdx = currentPage * ApplicationConstants.MAX_ITEM_COUNT + currentSelectIdx;
            RotarySelectorItem item = rotaryLayerView.RotaryItemList[selIdx];

            rotaryLayerView.SetItem(item);
            rotaryLayerView.SetText(item.MainText, item.SubText);
            return;
        }