Hi Bill,

about browser orientation, you have a bead in Basic: BrowserOrientation
- if orientation is portratit it dispatches: 'orientationPortrait'
- if orientation is landspace it dispatches: 'orientationLandscape'
It's exemplified in TDJ's MainContent.mxml

Regarding mixing layouts from Basic and Jewel. That's not supported since
both work differently and can lead to unexpected results.

Jewel uses class names in layouts, so you can inspect with the browser the
html tag and see what class names are assigned and how it changes when you
set another jewel layout.

So I think you have two paths here:
1.- see why jewel tile layout doesn't fit for your needs, if it's a bug in
it or what's going on. It's based on Flex spark tile layout, but still can
have bugs. I recommend this path since Tile layout should work fully. I
have it in a production app here [1].
2.- try to stick with basic one, but then I think you need to remove the
bead and also clean the class names of that layout before adding the basic
layout. But since Basic and Jewel are different, I can't say if it will
work fully. You need to try and see if that works, but having into account
that's not something to be supported.

HTH

Carlos

[1] https://avant2.es/productos-y-companias/

El sáb, 27 feb 2021 a las 2:18, Bilbosax (<waspenc...@comcast.net>)
escribió:

> Getting closer Carlos, but still struggling.  The only TileLayout that
> looks
> good and behaves how I need is the Basic TileLayout. I am changing the
> layout of an image gallery based on whether the browser is wider than it's
> height.  If it is in a landscape mode, I want the layout to use a Basic
> TileLayout.  If it is in portrait mode, I want it to use a Jewel
> HorizontalLayout.  Based on what you said above, I am not trying to remove
> the previous layout bead before setting a new one, just trying to change it
> in actionscript on the fly.  I can get it to go from the Jewel
> HorizontalLayout to the Basic TileLayout, but I can't get it to go from the
> Basic TileLayout back to the Jewel HorizontalLayout, it stays in Basic
> TileLayout.  You'll notice that I'm using a different itemrenderer for each
> layout.  Here is a simplified version of what I have:
>
> import org.apache.royale.html.beads.layouts.TileLayout;
> import org.apache.royale.jewel.beads.layouts.HorizontalLayout;
>
> if (appWidth > appHeight) {
>
>     imageList.className = "imageListItemRenderer";
>     var tile:TileLayout = new TileLayout();
>     tile.columnWidth = 200;
>     tile.rowHeight = 150;
>     tile.numColumns = 3;
>     imageList.addBead(tile);
>     imageList.dispatchEvent(new Event("layoutNeeded"));
>
> } else {
>
>     imageList.className = "imageListItemRendererHorizontal";
>     var hl2:HorizontalLayout = new HorizontalLayout();
>     imageList.addBead(hl2);
>     imageList.dispatchEvent(new Event("layoutNeeded"));
>
> }
>
>
> <j:List localId="imageList" className="imageListItemRendererHorizontal"
> click="preparePhotos(event)">
>     <j:beads>
>         <j:HorizontalLayout/>
>     </j:beads>
> </j:List>
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>


-- 
Carlos Rovira
Apache Member & Apache Royale PMC
*Apache Software Foundation*
http://about.me/carlosrovira

Reply via email to