blob: 74758b161429bbc11fb7eaf43add5dbb04f407c2 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="160" resize="resizeHandler(event)" creationComplete="initAPI()">
<fx:Style source="../../../../Assets/Fonts/MobileFontStyles.css" />
<fx:Script>
<![CDATA[
import mx.events.ResizeEvent;
import flash.display.StageAspectRatio;
import spark.events.PopUpEvent;
protected function resizeHandler(event:ResizeEvent):void
{
currentState = aspectRatio;
}
public var currentOS:String;
private function initAPI():void
{
currentOS = Capabilities.os;
}
]]>
</fx:Script>
<fx:Declarations>
<fx:Component className="MasterView">
<s:View>
<s:List width="100%" height="100%">
<s:dataProvider>
<s:NumericDataProvider minimum="10" maximum="30" />
</s:dataProvider>
</s:List>
</s:View>
</fx:Component>
<fx:Component className="DetailView">
<s:View>
<s:Label left="30" top="30">
<fx:String>
Steps to reproduce:
1. Rotate to portrait orientation
2. Click the "Master" button to open the master nav in a callout
3. With the callout open, rotate the device to landscape
4. If you can still read this text the bug is fixed :-)
</fx:String>
</s:Label>
</s:View>
</fx:Component>
</fx:Declarations>
<s:states>
<s:State name="portrait" stateGroups="tablet" />
<s:State name="landscape" stateGroups="tablet" />
</s:states>
<s:SplitViewNavigator id="svn" width="100%" height="100%" autoHideFirstViewNavigator="true">
<s:ViewNavigator includeIn="tablet" width="350" height="100%" firstView="{MasterView}" />
<s:ViewNavigator width="100%" height="100%" firstView="{DetailView}">
<s:navigationContent.portrait>
<s:Button id="btn" label="Master" click="svn.showFirstViewNavigatorInPopUp(btn)" />
<s:Button id="btn2" label="Rotate" click="this.stage.setOrientation(StageOrientation.ROTATED_LEFT)"/>
</s:navigationContent.portrait>
</s:ViewNavigator>
</s:SplitViewNavigator>
</s:Application>