0 Replies Latest reply on Jan 29, 2012 5:40 PM by RevTylerr

    Flex Mobile List view only displaying correctly in debug build

    RevTylerr

      I've got a horizontal list view that I've created in my app. There is a button that changes it's layout and items between a small thumbnail grid layoutand a larger thumbnail single row layout.

       

      In my debug build, this works just fine every single time. However, once I create a release build and install it, the listview doesn't have anything in it initially. If I press my layout change button, the large images show up, but they are shown vertically instead of horizontally.

       

      And if I hit the button again, I see the smaller images, except that they are in white boxes the size of the larger images.

       

      Here's some screenshots:

       

       

      device-2012-01-29-173227.png

       

      device-2012-01-29-173258.png

       

      device-2012-01-29-173312.png

      device-2012-01-29-173327.png

       

      device-2012-01-29-173335.png

      Here's my layout creation code:

       

       

      // setup the scroll view
                      scrollView.horizontalAlign="center";
                      scrollView.horizontalGap=20;
                      scrollView.orientation="columns";
                      scrollView.requestedRowCount=1;
                      scrollView.verticalAlign="middle";
                      scrollView.verticalGap=20;
                      
                      // setup the grid view
                      gridView.horizontalAlign="center";
                      gridView.horizontalGap=20;
                      gridView.orientation="columns";
                      gridView.requestedRowCount=2;
                      gridView.verticalAlign="middle";
                      gridView.verticalGap=20;
      

       

      Here is my layout swap code and my item adding:

       

       

      var imageClass:Class;
                      if(view == 1){
                          listy.layout = gridView;
                          imageClass = getDefinitionByName(getQualifiedClassName(new gridImg())) as Class;
                      }else{
                          listy.layout = scrollView;
                          imageClass = getDefinitionByName(getQualifiedClassName(new scrollImg())) as Class;
                      }
                      
                      var x:ArrayList = new ArrayList();
                      
                      var im:BitmapAsset;
                      im = new imageClass() as BitmapAsset;
                      var i:BitmapImage = new BitmapImage();
                      i.source = im;
                      x.addItem(i);
                      i = new BitmapImage();
                      i.source = im;
                      x.addItem(i);
                      i = new BitmapImage();
                      i.source = im;
                      x.addItem(i);
                      i = new BitmapImage();
                      i.source = im;
                      x.addItem(i);
                      i = new BitmapImage();
                      i.source = im;
                      x.addItem(i);
                      i = new BitmapImage();
                      i.source = im;
                      x.addItem(i);
                      i = new BitmapImage();
                      i.source = im;
                      x.addItem(i);
                      i = new BitmapImage();
                      i.source = im;
                      x.addItem(i);
                      
                      listy.dataProvider = x;
      

       

      And in case it's relevant, here's my embedded image code:

       

       

      [Embed(source="assets/logo.png")] 
                  [Bindable] 
                  public var gridImg:Class;
                  
                  [Embed(source="assets/logo2.png")] 
                  [Bindable] 
                  public var scrollImg:Class;
      

       

       

      Any help would be appreciated.