0

s:TabbedViewNavigatorApplication 内に as:ViewNavigator コンポーネントがあります。現在、一番下に表示されています。アクションバーのすぐ下のアプリの上部に表示するにはどうすればよいですか? flex sdk で関連するすべてのスキンを調べましたが、位置に関連するものは何も見つかりませんでした。

PS これは Flash Builder 4.6 のモバイルアプリです

s:TabbedViewNavigatorApplication コンポーネント内:

var nav:ViewNavigator = new ViewNavigator();
nav.label = "Newest";
nav.firstView = HomeView;
nav.firstViewData = "recent";
nav.percentWidth = 100;
nav.percentHeight = 100;

this.addElement(nav);
nav.titleContent = [];

s:TabbedViewNavigatorApplication スキンの変更: (if ステートメントを交換) (tabBar の y 位置を 60 変更)

if (contentGroup.includeInLayout)
        {
            var contentGroupHeight:Number = (_isOverlay) ? unscaledHeight : Math.max(unscaledHeight - tabBarHeight, 0);
            contentGroup.setLayoutBoundsSize(unscaledWidth, contentGroupHeight);
            contentGroup.setLayoutBoundsPosition(0, 0);
        }
        if (tabBar.includeInLayout)
        {
            tabBarHeight = Math.min(tabBar.getPreferredBoundsHeight(), unscaledHeight);
            tabBar.setLayoutBoundsSize(unscaledWidth, tabBarHeight);
            tabBar.setLayoutBoundsPosition(0, 60); //unscaledHeight - tabBarHeight
            tabBarHeight = tabBar.getLayoutBoundsHeight(); 

            // backgroundAlpha is not a declared style on ButtonBar
            // TabbedViewNavigatorButtonBarSkin implements for overlay support
            var backgroundAlpha:Number = (_isOverlay) ? 0.75 : 1;
            tabBar.setStyle("backgroundAlpha", backgroundAlpha);
        }

ViewNavigator スキンの変更:

(contentGroupHeight から (-) contentGroupPosition を取り除いた)

(アプリ内の他の要素がボタンバーの下にならないように contentGroupPosition を 2 倍にします。アクション バーとボタンバーは、これが正しく機能するために同じサイズである必要があり、vieNavigator からボタン バー自体の高さにアクセスする方法はありません。私が知る限り皮膚)

if (contentGroup.includeInLayout)
        {
            // If the hostComponent is in overlay mode, the contentGroup extends
            // the entire bounds of the navigator and the alpha for the action 
            // bar changes
            // If this changes, also update validateEstimatedSizesOfChild
            var contentGroupHeight:Number = (_isOverlay) ? unscaledHeight : Math.max(unscaledHeight - actionBarHeight, 0);
            var contentGroupPosition:Number = (_isOverlay) ? 0 : actionBarHeight;

            contentGroup.setLayoutBoundsSize(unscaledWidth, contentGroupHeight-contentGroupPosition);
            contentGroup.setLayoutBoundsPosition(0, contentGroupPosition*2);
        }
4

0 に答える 0