<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Learn how to create a simple virtual layout in Flex 4</title>
	<atom:link href="http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-flex-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-flex-4/</link>
	<description>Programming under the influence of Flex</description>
	<lastBuildDate>Sun, 22 Jan 2012 01:08:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Steven Shongrunden</title>
		<link>http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-flex-4/comment-page-1/#comment-8991</link>
		<dc:creator>Steven Shongrunden</dc:creator>
		<pubDate>Tue, 06 Dec 2011 22:43:29 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=474#comment-8991</guid>
		<description>&lt;a href=&quot;#comment-8571&quot; rel=&quot;nofollow&quot;&gt;@Rozen&lt;/a&gt; - You can&#039;t selectively recycle item renderers, but what I would recommend doing is having the state be a field in the data object and have your ItemRenderer override public function set data() and set the renderer&#039;s state based on the value of that field.  That way whether the renderer is open or closed is determined completely from within the data item (not a specific renderer instance).</description>
		<content:encoded><![CDATA[<p><a href="#comment-8571" rel="nofollow">@Rozen</a> &#8211; You can&#8217;t selectively recycle item renderers, but what I would recommend doing is having the state be a field in the data object and have your ItemRenderer override public function set data() and set the renderer&#8217;s state based on the value of that field.  That way whether the renderer is open or closed is determined completely from within the data item (not a specific renderer instance).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rozen</title>
		<link>http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-flex-4/comment-page-1/#comment-8571</link>
		<dc:creator>Rozen</dc:creator>
		<pubDate>Fri, 25 Nov 2011 03:57:39 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=474#comment-8571</guid>
		<description>Steven,

Great article.  Thanks.

Quick question,  I&#039;m using virtual-layout and I&#039;ve a &quot;List&quot; with custom IR with two states: normal, open.  How could I avoid recycling the IRs that are in &quot;open&quot; state?  So, basically if user open an IR then I don&#039;t wanna recycle that IR when user scrolls down the list.</description>
		<content:encoded><![CDATA[<p>Steven,</p>
<p>Great article.  Thanks.</p>
<p>Quick question,  I&#8217;m using virtual-layout and I&#8217;ve a &#8220;List&#8221; with custom IR with two states: normal, open.  How could I avoid recycling the IRs that are in &#8220;open&#8221; state?  So, basically if user open an IR then I don&#8217;t wanna recycle that IR when user scrolls down the list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Shongrunden</title>
		<link>http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-flex-4/comment-page-1/#comment-3506</link>
		<dc:creator>Steven Shongrunden</dc:creator>
		<pubDate>Mon, 14 Mar 2011 05:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=474#comment-3506</guid>
		<description>&lt;a href=&quot;#comment-3385&quot; rel=&quot;nofollow&quot;&gt;@Brian&lt;/a&gt; - The List component forces useVirtualLayout=&quot;true&quot; on its layout by default.  The only way to turn it off is to set useVirtualLayout=&quot;false&quot; directly on the List.  The comments in &lt;a href=&quot;http://flexponential.com/2009/07/10/performance-implications-of-the-list-itemrenderer-vs-itemrendererfunction-properties/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; explain a little more.

There are lower level spark components that support virtual layout.

The lowest level is the spark DataGroup (which List uses in its skin).  That component doesn&#039;t expose a useVirtualLayout property and in that case you set useVirtualLayout on the layout directly and it is respected.

DataGroup has no concept of chrome (like Group) so it can&#039;t be skinned.  If you want to also support spark skinning then look into using the SkinnableDataContainer component (which is what List extends from).

On the mobile front it sounds like you want item snapping and page based scrolling.  This is something listed as a B+ feature in the &lt;a href=&quot;http://opensource.adobe.com/wiki/display/flexsdk/Mobile+List,+Scroller+and+Touch&quot; rel=&quot;nofollow&quot;&gt;List spec&lt;/a&gt;.

I believe implementing this by extending List will be tricky.  What I would probably recommend is to use DataGroup and setup your own scrolling logic that then sets the verticalScrollPosition/horizontalScrollPosition directly and animates/snaps appropriately.</description>
		<content:encoded><![CDATA[<p><a href="#comment-3385" rel="nofollow">@Brian</a> &#8211; The List component forces useVirtualLayout=&#8221;true&#8221; on its layout by default.  The only way to turn it off is to set useVirtualLayout=&#8221;false&#8221; directly on the List.  The comments in <a href="http://flexponential.com/2009/07/10/performance-implications-of-the-list-itemrenderer-vs-itemrendererfunction-properties/" rel="nofollow">this post</a> explain a little more.</p>
<p>There are lower level spark components that support virtual layout.</p>
<p>The lowest level is the spark DataGroup (which List uses in its skin).  That component doesn&#8217;t expose a useVirtualLayout property and in that case you set useVirtualLayout on the layout directly and it is respected.</p>
<p>DataGroup has no concept of chrome (like Group) so it can&#8217;t be skinned.  If you want to also support spark skinning then look into using the SkinnableDataContainer component (which is what List extends from).</p>
<p>On the mobile front it sounds like you want item snapping and page based scrolling.  This is something listed as a B+ feature in the <a href="http://opensource.adobe.com/wiki/display/flexsdk/Mobile+List,+Scroller+and+Touch" rel="nofollow">List spec</a>.</p>
<p>I believe implementing this by extending List will be tricky.  What I would probably recommend is to use DataGroup and setup your own scrolling logic that then sets the verticalScrollPosition/horizontalScrollPosition directly and animates/snaps appropriately.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-flex-4/comment-page-1/#comment-3385</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Thu, 03 Mar 2011 16:33:45 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=474#comment-3385</guid>
		<description>Hi Steven,

This is a great tutorial. Thanks for posting.

Is it necessary to put the SimpleHorizontalLayout inside a List in order to utilize virtual layout? In other words does the outside element have to have the useVirtualLayout property or could we just set it directly on SimpleHorizontalLayout?

I am trying to make a gallery app to flip through a user&#039;s photos, very similar to the iPhone Photos app (but for AIR for Android). I can&#039;t figure out how to overrride the List&#039;s free-form scrolling to change it to image by image. I was going to try extending ListBase as my next effort, but I thought you might have a better suggestion?

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Steven,</p>
<p>This is a great tutorial. Thanks for posting.</p>
<p>Is it necessary to put the SimpleHorizontalLayout inside a List in order to utilize virtual layout? In other words does the outside element have to have the useVirtualLayout property or could we just set it directly on SimpleHorizontalLayout?</p>
<p>I am trying to make a gallery app to flip through a user&#8217;s photos, very similar to the iPhone Photos app (but for AIR for Android). I can&#8217;t figure out how to overrride the List&#8217;s free-form scrolling to change it to image by image. I was going to try extending ListBase as my next effort, but I thought you might have a better suggestion?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Shongrunden</title>
		<link>http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-flex-4/comment-page-1/#comment-1025</link>
		<dc:creator>Steven Shongrunden</dc:creator>
		<pubDate>Fri, 14 May 2010 06:37:59 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=474#comment-1025</guid>
		<description>&lt;a href=&quot;#comment-1013&quot; rel=&quot;nofollow&quot;&gt;@Scott&lt;/a&gt; - Flex 4 does provide a TileLayout class which supports virtual layout.  Take a look at that class to see if it does what you need.</description>
		<content:encoded><![CDATA[<p><a href="#comment-1013" rel="nofollow">@Scott</a> &#8211; Flex 4 does provide a TileLayout class which supports virtual layout.  Take a look at that class to see if it does what you need.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-flex-4/comment-page-1/#comment-1013</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Mon, 10 May 2010 16:05:06 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=474#comment-1013</guid>
		<description>Hi Steven, 

Thanks for the tutorial. What if I need to use a tile layout? I am guessing I need to alter some code, but not exactly sure where.

Thanks for the insight.</description>
		<content:encoded><![CDATA[<p>Hi Steven, </p>
<p>Thanks for the tutorial. What if I need to use a tile layout? I am guessing I need to alter some code, but not exactly sure where.</p>
<p>Thanks for the insight.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Shongrunden</title>
		<link>http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-flex-4/comment-page-1/#comment-895</link>
		<dc:creator>Steven Shongrunden</dc:creator>
		<pubDate>Sun, 18 Apr 2010 17:31:54 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=474#comment-895</guid>
		<description>&lt;a href=&quot;#comment-874&quot; rel=&quot;nofollow&quot;&gt;@Silva Developer&lt;/a&gt; - Setting x and y on the elements directly will only work on a layout that respects them (like BasicLayout).  In this layout you need to use  element.setLayoutBoundPosition(x,y) to position the element rather than setting x and y directly.</description>
		<content:encoded><![CDATA[<p><a href="#comment-874" rel="nofollow">@Silva Developer</a> &#8211; Setting x and y on the elements directly will only work on a layout that respects them (like BasicLayout).  In this layout you need to use  element.setLayoutBoundPosition(x,y) to position the element rather than setting x and y directly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Silva Developer</title>
		<link>http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-flex-4/comment-page-1/#comment-874</link>
		<dc:creator>Silva Developer</dc:creator>
		<pubDate>Thu, 15 Apr 2010 19:22:15 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=474#comment-874</guid>
		<description>Hi Steven,

Thanks for your answer.

I was tried set the x and y of each custom UIComponent datagroup dataprovider, but doesn&#039;t work... Keep positioning in the same way, horizontally.

If you&#039;ve some tip, will welcome.

Tranks!</description>
		<content:encoded><![CDATA[<p>Hi Steven,</p>
<p>Thanks for your answer.</p>
<p>I was tried set the x and y of each custom UIComponent datagroup dataprovider, but doesn&#8217;t work&#8230; Keep positioning in the same way, horizontally.</p>
<p>If you&#8217;ve some tip, will welcome.</p>
<p>Tranks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Shongrunden</title>
		<link>http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-flex-4/comment-page-1/#comment-846</link>
		<dc:creator>Steven Shongrunden</dc:creator>
		<pubDate>Sun, 11 Apr 2010 00:56:34 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=474#comment-846</guid>
		<description>&lt;a href=&quot;#comment-817&quot; rel=&quot;nofollow&quot;&gt;@Silva Developer &lt;/a&gt; - I&#039;m not sure I understand your question.  If you look at the code in updateDisplayList you will see this line that is responsible for positioning the element:

    element.setLayoutBoundsPosition(x, y);</description>
		<content:encoded><![CDATA[<p><a href="#comment-817" rel="nofollow">@Silva Developer </a> &#8211; I&#8217;m not sure I understand your question.  If you look at the code in updateDisplayList you will see this line that is responsible for positioning the element:</p>
<p>    element.setLayoutBoundsPosition(x, y);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Silva Developer</title>
		<link>http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-flex-4/comment-page-1/#comment-817</link>
		<dc:creator>Silva Developer</dc:creator>
		<pubDate>Mon, 05 Apr 2010 18:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=474#comment-817</guid>
		<description>Hey man very nice!!!

I&#039;ve a question, in this class what we need change to put my elements setting absolute positions (x and y)?</description>
		<content:encoded><![CDATA[<p>Hey man very nice!!!</p>
<p>I&#8217;ve a question, in this class what we need change to put my elements setting absolute positions (x and y)?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

