1 Reply Latest reply on Mar 22, 2011 8:10 PM by Shongrunden

    Spark List TileLayout rowCount issue

    OrthATG

      I have a simple list control that is populated by an arrayCollection.  The data is valid, and there are always 6 items in the collection.  When using a tileLayout, it only shows 1 row (2 items), or when I set the orientation to columns, it only shows 1 column (3 items).  It behaves this way with or without a custom itemRenderer.  When I debug, I can see that requestedRowCount = 3, my dataProvider has 6 valid items, the height of the list is as it should be if there were 3 rows, but rowCount = 1.

       

      If I remove the TileLayout, it displays all 6 items vertically (as expected).

       

      I've used TileLayout before and it has worked just fine.  Any help would be much appreciated.

       

       

      List is contained in a view created from PopupManager:

       

      <s:List dataProvider="{_collection}"
                      top="233"
                      width="300"
                      itemRenderer="com.here.is.my.renderer">
                  <s:layout>

       

                <!-- I know only one of the requestedCounts is used depending on the orientation, but these are the 2 options that I've tried-->              

       

                     <s:TileLayout requestedColumnCount="2"
                                    requestedRowCount="3"
                                    horizontalGap="0"
                                    verticalGap="0"/>
                  </s:layout>
              </s:List>

       

      Thanks!

        • 1. Re: Spark List TileLayout rowCount issue
          Shongrunden Adobe Employee

          This example seems to work fine for me:

          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                         xmlns:s="library://ns.adobe.com/flex/spark">

           

              <s:List width="300">

                  <s:dataProvider>

                      <s:ArrayList>

                          <fx:String>0</fx:String>

                          <fx:String>1</fx:String>

                          <fx:String>2</fx:String>

                          <fx:String>3</fx:String>

                          <fx:String>4</fx:String>

                          <fx:String>5</fx:String>

                      </s:ArrayList>

                  </s:dataProvider>

                  <s:layout>

                      <s:TileLayout requestedColumnCount="2"

                                    requestedRowCount="3"

                                    horizontalGap="0"

                                    verticalGap="0" />

                  </s:layout>

              </s:List>

           

          </s:Application>

           

          Can you please provide a similar example that demonstrates the issue you are seeing?