如何在我的选项卡式视图导航器中选择一个选项卡?

时间:2013-01-12 15:26:02

标签: flex select mobile swipe tabbar

我给了我的移动应用程序两种导航方式,一方面是滑动(左/右)的方式,另一方面是底部的正常tabbar到"点"用你的手指。因此,当我添加了滑动功能时,我认识到当我滑动到另一个页面时,栏不会更新它们的按钮 - 我正在寻找一些选择我的swip Tab的特定按钮的命令。

init():
        protected function init():void{
            this.addEventListener( TransformGestureEvent.GESTURE_SWIPE, handleSwipe );  
        }



handleSwipe():

        private function handleSwipe(event:TransformGestureEvent):void
        {
            var slideViewTransition:SlideViewTransition = new SlideViewTransition();    
            // Swipe was to the right
            if (event.offsetX == 1 ) {
                slideViewTransition.direction = ViewTransitionDirection.RIGHT;
                navigator.pushView( views.HomeView, null, null, slideViewTransition );
                play("swipeee");
            }
                // Swipe was to the left
            else if (event.offsetX == -1 ) {
                slideViewTransition.direction = ViewTransitionDirection.LEFT;
                navigator.pushView( views.HomeView, null, null, slideViewTransition );
                play("swipeee");
            }
        }

我想我必须从我的tabbedViewNavigator MainClass中获取数据......但我没有idead如何

0 个答案:

没有答案