blob: a47cf0a5482673e18eeb576a294fbb3565ed4fa1 [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:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
title="Nested (in Basic)">
<fx:Script source="viewScript.as" />
<s:Scroller id="outerScroller" width="100%" height="100%">
<s:Group id="outerViewport">
<s:Rect width="50" height="50"><s:fill><s:SolidColor color="0x000000" /></s:fill></s:Rect>
<s:Scroller id="innerScroller" width="200" height="200" x="50" y="50">
<s:Group id="innerViewport">
<s:Image source="@Embed('../../../../../../Assets/Images/orangerect.jpg')" />
</s:Group>
</s:Scroller>
<s:List id="vList" dataProvider="{createIdenticalItems(100, 80, 80, 'vertical')}"
itemRenderer="renderers.GreydientItemRenderer" width="200" height="200" x="50" y="250"
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="200" height="200" x="250" y="50"
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="50" height="50" x="350" y="350"><s:fill><s:SolidColor color="0x000000" /></s:fill></s:Rect>
<s:Rect width="50" height="50" x="400" y="400"><s:fill><s:SolidColor color="0x222222" /></s:fill></s:Rect>
<s:Rect width="50" height="50" x="450" y="450"><s:fill><s:SolidColor color="0x555555" /></s:fill></s:Rect>
<s:Rect width="50" height="50" x="500" y="500"><s:fill><s:SolidColor color="0x666666" /></s:fill></s:Rect>
<s:Rect width="50" height="50" x="550" y="550"><s:fill><s:SolidColor color="0x7f7f7f" /></s:fill></s:Rect>
<s:Rect width="50" height="50" x="600" y="600"><s:fill><s:SolidColor color="0x999999" /></s:fill></s:Rect>
<s:Rect width="50" height="50" x="650" y="650"><s:fill><s:SolidColor color="0xCCCCCC" /></s:fill></s:Rect>
<s:Rect width="50" height="50" x="700" y="700"><s:fill><s:SolidColor color="0xE6E6E7" /></s:fill></s:Rect>
<s:Rect width="150" height="150" x="750" y="750"><s:fill><s:SolidColor color="0xE9E9E9" /></s:fill></s:Rect>
<s:Rect width="250" height="250" x="900" y="900"><s:fill><s:SolidColor color="0xF1F1F1" /></s:fill></s:Rect>
<s:Rect width="250" height="250" x="1150" y="1150"><s:fill><s:SolidColor color="0xF3F3F3" /></s:fill></s:Rect>
</s:Group>
</s:Scroller>
</s:View>