2 Replies Latest reply on Nov 3, 2011 10:28 AM by ericp@cbnw.org

    Problem with spark list scrolling off screen

    ericp@cbnw.org

      I'm working on a mobile app using Flex 4.5.1.

      I have a detail view which has vgroup that contains some labels, followed by a list control. The number of labels and the number of items in the list can both vary depending on the item selected prior to entering this view.

      So my list control in some cases extends beyond the bottom of the screen. I want the labels at the top to remain visible at all times and just have the list at the bottom scroll to be able to see and select all items.

      What I get is a list at the bottom which I can scroll, but as soon as I let go it returns to the top so I'm never able to select anything that requires scrolling to get to.

      I have the basic layout set up in mxml with a vgroup that contains another vgroup followed by the list. In actionscript I'm adding items to the dataprovider for the list and labels for the inner vgroup.

       

      <s:VGroup id="outerGroup"

                      width="100%" height="100%"    

                      enabled="false"

                      visible="false">

       

      <s:VGroup id="labelGroup"

                       paddingTop="10" paddingBottom="10" paddingLeft="5" paddingRight="5"

                        width="100%"/>

       

        <s:List id="actionsList"

                    width="100%"

                    alternatingItemColors="[#ffffff,#ebebeb]"

                    dataProvider="{actions}"

                    change="actionsList_changeHandler(actionsList.selectedItem)">

         <s:itemRenderer>

          <fx:Component>

           <s:IconItemRenderer label="label"

                                          messageField="message"

                                          decorator="{data.icon}"/>

          </fx:Component>

         </s:itemRenderer>

        

        </s:List>

       

      </s:VGroup>

       

       

      Any help is very much appreciated.