| <?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:View xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| title="Nested (in Vertical)"> |
| |
| <fx:Script source="viewScript.as" /> |
| |
| <s:actionContent> |
| <s:Button label="in Horizontal" click="navigator.pushView(views.NestedInHorizontalView)" /> |
| </s:actionContent> |
| |
| <s:Scroller id="outerScroller" width="100%" height="100%"> |
| <s:Group id="outerViewport"> |
| <s:layout> |
| <s:VerticalLayout horizontalAlign="center" /> |
| </s:layout> |
| |
| <s:Rect width="80%" height="100"><s:fill><s:SolidColor color="0x000000" /></s:fill></s:Rect> |
| |
| <s:Scroller id="innerScroller" width="80%" height="200"> |
| <s:Group id="innerViewport"> |
| <s:Image source="@Embed('../../../../../../Assets/Images/redrect.jpg')" /> |
| </s:Group> |
| </s:Scroller> |
| |
| <s:List id="vList" dataProvider="{createIdenticalItems(100, 80, 80, 'vertical')}" |
| itemRenderer="renderers.GreydientItemRenderer" width="80%" height="200" |
| horizontalScrollPolicy="off"> |
| <s:layout> |
| <s:VerticalLayout gap="1"/> |
| </s:layout> |
| </s:List> |
| |
| <s:List id="hList" dataProvider="{createIdenticalItems(100, 80, 80, 'horizontal')}" |
| itemRenderer="renderers.GreydientItemRenderer" width="80%" height="200" |
| verticalScrollPolicy="off"> |
| <s:layout> |
| <s:HorizontalLayout gap="1"/> |
| </s:layout> |
| </s:List> |
| |
| <!-- these Rects ensure content size is larger than viewport size of the outer scroller --> |
| |
| <s:Rect width="80%" height="100"><s:fill><s:SolidColor color="0x000000" /></s:fill></s:Rect> |
| <s:Rect width="80%" height="100"><s:fill><s:SolidColor color="0x222222" /></s:fill></s:Rect> |
| <s:Rect width="80%" height="100"><s:fill><s:SolidColor color="0x555555" /></s:fill></s:Rect> |
| <s:Rect width="80%" height="100"><s:fill><s:SolidColor color="0x666666" /></s:fill></s:Rect> |
| <s:Rect width="80%" height="100"><s:fill><s:SolidColor color="0x7f7f7f" /></s:fill></s:Rect> |
| <s:Rect width="80%" height="100"><s:fill><s:SolidColor color="0x999999" /></s:fill></s:Rect> |
| <s:Rect width="80%" height="100"><s:fill><s:SolidColor color="0xCCCCCC" /></s:fill></s:Rect> |
| <s:Rect width="80%" height="100"><s:fill><s:SolidColor color="0xE3E3E3" /></s:fill></s:Rect> |
| <s:Rect width="80%" height="250"><s:fill><s:SolidColor color="0xE9E9E9" /></s:fill></s:Rect> |
| |
| </s:Group> |
| </s:Scroller> |
| |
| </s:View> |