<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Devgirls Weblog</title>
	<atom:link href="http://devgirl.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://devgirl.org</link>
	<description>Trials and tribulations of software development...</description>
	<lastBuildDate>Fri, 20 Jan 2012 17:38:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Flex Mobile Development &#8211; Dynamic Splash Screens</title>
		<link>http://devgirl.org/2012/01/20/flex-mobile-development-dynamic-splash-screens/</link>
		<comments>http://devgirl.org/2012/01/20/flex-mobile-development-dynamic-splash-screens/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 17:14:11 +0000</pubDate>
		<dc:creator>Holly Schinsky</dc:creator>
				<category><![CDATA[Apache Flex]]></category>
		<category><![CDATA[Flash Builder 4.6]]></category>
		<category><![CDATA[Flex 4.6]]></category>
		<category><![CDATA[dynamic splash screen]]></category>
		<category><![CDATA[flex dynamic splash]]></category>
		<category><![CDATA[flex splash screen]]></category>
		<category><![CDATA[SplashScreenImage]]></category>

		<guid isPermaLink="false">http://devgirl.org/?p=3635</guid>
		<description><![CDATA[Flash Builder 4.6 includes a new feature to allow you to add a dynamic splash screen component to your mobile application. This feature will allow you to load a different image based on a few different properties you can set to ensure you get the best image for the right device. The properties you can [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://www.adobe.com/cfusion/tdrc/index.cfm?product=flash_builder">Flash Builder 4.6</a> includes a new feature to allow you to add a dynamic splash screen component to your mobile application. This feature will allow you to load a different image based on a few different properties you can set to ensure you get the best image for the right device. The properties you can use to determine which image is displayed for the splash screen are:</p>
<p><em><strong>dpi<br />
minResolution<br />
aspectRatio</strong></em></p>
<p>You can combine these attributes as well to get the best possible image selected. It&#8217;s very easy to implement, you simple create an MXML component based on the <strong>SplashScreenImage</strong> property and include as many <strong>SplashScreenImageSource</strong> objects to cover the number of situations needed. For example, in the following code I&#8217;m setting different images depending on both<em> <strong>dpi</strong></em> and <em><strong>aspectRatio</strong></em> properties. Note that this example makes an assumption about tablets generally being 160 DPI (thus needing the bigger image), the 320 DPI being the iPhone 4 and above and most android phones at 240 and setting the image based on that. It also assumes that I want to use the landscape version of the image when the <em><strong>aspectRatio</strong></em> happens to be landscape on startup. You could also use the <em><strong>minResolution</strong></em> to further ensure that the 160 DPI is indeed a tablet etc and that will cause the the stage width and stage height to be compared on startup to find the largest number of the two. If it&#8217;s equal to or greater than your <em><strong>minResolution</strong></em> setting, it will select that image for the splash screen. </p>
<p><strong>DynamicSplashScreen.mxml</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:SplashScreenImage xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot; xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;&gt;
	&lt;s:SplashScreenImageSource dpi=&quot;160&quot; aspectRatio=&quot;portrait&quot; source=&quot;@Embed('assets/texas-768x1024.jpg')&quot;/&gt;
	&lt;s:SplashScreenImageSource dpi=&quot;240&quot; aspectRatio=&quot;portrait&quot; source=&quot;@Embed('assets/texas-480x810.jpg')&quot;/&gt;
	&lt;s:SplashScreenImageSource dpi=&quot;320&quot; aspectRatio=&quot;portrait&quot; source=&quot;@Embed('assets/texas-640x960.jpg')&quot;/&gt;
        &lt;s:SplashScreenImageSource dpi=&quot;160&quot; aspectRatio=&quot;landscape&quot; source=&quot;@Embed('assets/texas-1024x768.jpg')&quot;/&gt;
	&lt;s:SplashScreenImageSource dpi=&quot;240&quot; aspectRatio=&quot;landscape&quot; source=&quot;@Embed('assets/texas-810x480.jpg')&quot;/&gt;
	&lt;s:SplashScreenImageSource dpi=&quot;320&quot; aspectRatio=&quot;landscape&quot; source=&quot;@Embed('assets/texas-960x640.jpg')&quot;/&gt;
&gt;/s:SplashScreenImage&gt;
</pre>
<p>Now in your main application root, you simply specify the name of your component defined above in the <em><strong>splashScreenImage</strong></em> property as follows:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:ViewNavigatorApplication xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
							xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
							firstView=&quot;views.FrontView&quot;
							splashScreenImage=&quot;DynamicSplashScreen&quot;&gt;
...
&lt;/s:ViewNavigatorApplication&gt;
</pre>
<div align="center"><strong>Portrait Splash</strong></div>
<p><a href="http://devgirl.org/wp-content/uploads/2012/01/portraitSplash1.png"><img src="http://devgirl.org/wp-content/uploads/2012/01/portraitSplash1-225x300.png" alt="" title="portraitSplash" width="225" height="300" class="aligncenter size-medium wp-image-3741" /></a></p>
<div align="center"><strong>Landscape Splash</strong></div>
<p><a href="http://devgirl.org/wp-content/uploads/2012/01/landscapeSplash1.png"><img src="http://devgirl.org/wp-content/uploads/2012/01/landscapeSplash1-300x225.png" alt="" title="landscapeSplash" width="300" height="225" class="aligncenter size-medium wp-image-3742" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdevgirl.org%2F2012%2F01%2F20%2Fflex-mobile-development-dynamic-splash-screens%2F&amp;title=Flex%20Mobile%20Development%20%26%238211%3B%20Dynamic%20Splash%20Screens" id="wpa2a_2"><img src="http://devgirl.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://devgirl.org/2012/01/20/flex-mobile-development-dynamic-splash-screens/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apache Flex Update!</title>
		<link>http://devgirl.org/2012/01/19/apache-flex-update/</link>
		<comments>http://devgirl.org/2012/01/19/apache-flex-update/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 15:24:39 +0000</pubDate>
		<dc:creator>Holly Schinsky</dc:creator>
				<category><![CDATA[Apache Flex]]></category>
		<category><![CDATA[Flex 4.6]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Apache Flex Status]]></category>
		<category><![CDATA[Flex User Group Tour]]></category>

		<guid isPermaLink="false">http://devgirl.org/?p=3645</guid>
		<description><![CDATA[It&#8217;s been quite the roller coaster in the Flex world these past few months to say the least! Now seemed like a good time for an update on the latest status of things. Adobe Flex to Apache Flex Adobe Flex is now Apache Flex (in case you&#8217;ve been under a rock lately or perhaps just [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been quite the roller coaster in the Flex world these past few months to say the least! Now seemed like a good time for an update on the latest status of things. </p>
<p><a href="http://devgirl.org/wp-content/uploads/2012/01/Flexicon1.png"><img src="http://devgirl.org/wp-content/uploads/2012/01/Flexicon1.png" alt="" title="Flexicon" width="256" height="256" class="aligncenter size-full wp-image-3711" /></a></p>
<p></a><a href="http://www.apache.org"><img src="http://devgirl.org/wp-content/uploads/2012/01/asf_logo_wide.gif" alt="" title="Apache Software Foundation" width="537" height="51" class="aligncenter size-full wp-image-3662"/></a></p>
<p><strong>Adobe Flex to Apache Flex</strong><br />
Adobe Flex is now <a href="http://incubator.apache.org/flex/">Apache Flex</a> (in case you&#8217;ve been under a rock lately or perhaps just discovered Flex <img src='http://devgirl.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ). It&#8217;s been contributed to the Apache community and is in <a href="http://incubator.apache.org/projects/">incubator status</a>. Incubator status is a holding place for a new Apache project and basically a gateway to it becoming a full-fledged project after a release or two. It was great news that it was accepted recently and I have no doubt it will quickly move out of this stage into a full-fledged project. The project has an amazing amount of traction so far, and it&#8217;s awesome to see all the activity! If you want to stay on top of the latest, <a href="http://incubator.apache.org/flex/mailing-lists.html">subscribe to the mailing list here</a>, (note that your inbox will be flooded so you might want to use a separate email to track it, it&#8217;s a high traffic mailing list <img src='http://devgirl.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ). There are a bunch of extremely talented, well-known developers behind this project as well, which is huge and makes all the difference, in my opinion. <a href="http://www.spoon.as/">The Open Spoon Foundation</a> is also actively behind this project and if you aren&#8217;t aware of it, definitely make a point of checking it out. I attended the Flex Summit in December and learned a lot about the Apache process from <a href="http://roy.gbiv.com/">Roy Fielding</a> (Apache Co-Founder), with the biggest takeaway being that Apache projects are run as a <a href="http://www.merriam-webster.com/dictionary/meritocracy">meritocracy</a>, so there is equal opportunity amongst all and that contributions of any kind, including code, bug fixes and documentation are <a href="http://incubator.apache.org/flex/get-involved.html">welcome</a>.</p>
<p><strong>The State of Things&#8230;</strong><br />
So the big question everyone has been asking us, should we continue to build apps with Flex? I think the general consensus to be made is yes. There&#8217;s still a viable need for this technology and with the dedication and energy of the community so far I feel very positive about things. As I&#8217;ve stated before and will continue to state, as a developer you shouldn&#8217;t put all of your eggs in any one basket, and should be learning the latest technologies along with continuing your Flex development to ensure your relevance and development diversity, but Flex remains an excellent choice for the right type of application. </p>
<p>Here are some related links you should check out that I found very useful as a meter for what other great developers are thinking and doing:</p>
<p><a href="http://inflagrantedelicto.memoryspiral.com/2012/01/questioning-the-viability-of-flex/">Joseph Labrecque &#8211; Questioning the viability of Flex</a><br />
<a href="https://plus.google.com/109047477151984864676/posts/CVGJKLMMehs">Joao Saleiro &#8211; After 6 years doing Flex, am I moving to HTML5? </a><br />
<a href="http://www.theflexshow.com/blog/index.cfm/2012/1/11/Open-Discussion-w-Joseph-Labrecque-and-Mark-Ehlert-The-Flex-Show-Episode-159">The Flex Show &#8211; Discussing the Future of Flex with Joseph Labrecque and Mark Ehlert</a></p>
<p><strong>Hot Topics&#8230;</strong><br />
One big topic on the mailing list right now centers around a new logo for Apache Flex. The community held a contest (over 50 entries submitted!) and the submissions can be found <a href="http://dl.dropbox.com/u/715349/tmp/flex-logos.html">here</a>. The contest ended yesterday and now the voting process has begun. To vote you will need to start by subscribing to the mailing list. Once subscribed you can cast your votes with a point system defined in the mailing list. There are also some excellent summaries of what&#8217;s going on with the project being posted to this <a href="http://blog.teotigraphix.com/">blog by Michael Schmalle </a> (a current contributor). I would definitely make a point to skim those summaries to get a quick read on the status of things since it can be hard to keep up with the mailing list.  </p>
<p>The following links are also useful to check out for more info:<br />
<a href="http://incubator.apache.org/flex/">The Flex Incubator Project</a><br />
<a href="http://incubator.apache.org/flex/team.html">Contributors</a><br />
<a href="https://issues.apache.org/jira/browse/">JIRA Bug Tracking</a><br />
<a href="http://incubator.apache.org/projects/flex">Flex Incubator Status Page</a><br />
<a href="http://wiki.apache.org/incubator/FlexProposal">The initial proposal from Adobe</a><br />
<a href="http://incubator.apache.org/flex/get-involved.html">Getting Involved</a></p>
<p><strong>This Blog&#8230; </strong><br />
As far as me and my evangelism are concerned, I plan to continue to use Flex and blog about it as I have been. The <a href="http://blogs.adobe.com/flex/2012/01/announcing-flex-user-group-2012-tour-north-america-dates.html">2012 Flex User Group Tour</a> is about to start and my team will be visiting many locations over the next couple of months where we&#8217;ll discuss all the recent activity and announcements and talk about the latest 4.6 release. You can also plan on seeing some posts on other technologies as I&#8217;m exploring them myself. I will make a point of comparing them to Flex as I go along where possible. I&#8217;m also really looking forward to seeing what Adobe has in store this year to help utilize these other technologies like HTML5, JavaScript/jQuery etc and already excited by what I&#8217;ve heard! I will post information on these topics as I&#8217;m allowed <img src='http://devgirl.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdevgirl.org%2F2012%2F01%2F19%2Fapache-flex-update%2F&amp;title=Apache%20Flex%20Update%21" id="wpa2a_4"><img src="http://devgirl.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://devgirl.org/2012/01/19/apache-flex-update/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Game of Flex for Tablets Released!</title>
		<link>http://devgirl.org/2011/12/07/game-of-flex-for-tablets-released/</link>
		<comments>http://devgirl.org/2011/12/07/game-of-flex-for-tablets-released/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 19:32:46 +0000</pubDate>
		<dc:creator>Holly Schinsky</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Flex 4.5]]></category>
		<category><![CDATA[Flex 4.5/Mobile]]></category>
		<category><![CDATA[Flex 4.6]]></category>
		<category><![CDATA[Flex Game]]></category>
		<category><![CDATA[Game of Flex]]></category>
		<category><![CDATA[Tour de Mobile Flex]]></category>

		<guid isPermaLink="false">http://devgirl.org/?p=3615</guid>
		<description><![CDATA[My fellow teammate Michael Chaize recently had an idea for creating a &#8216;game&#8217; to showcase Flex and the latest 4.6 release features with Tour de Mobile Flex being the initial inspiration. I&#8217;m happy to announce that the Game of Flex is now available on both the Apple iTunes and Android Market for your downloading pleasure [...]]]></description>
			<content:encoded><![CDATA[<p>My fellow teammate <a href="http://www.riagora.com/">Michael Chaize</a> recently had an idea for creating a &#8216;game&#8217; to showcase Flex and <a href="http://www.adobe.com/content/dotcom/en/devnet/flex/articles/introducing-flex46sdk.html">the latest 4.6 release</a> features with <a href="http://flex.org/tour-de-mobile-flex/">Tour de Mobile Flex</a> being the initial inspiration. I&#8217;m happy to announce that the <a href="http://flex.org/flexgame/">Game of Flex</a> is now available on both the <a href="http://itunes.apple.com/us/app/game-of-flex/id483389384">Apple iTunes</a> and <a href="https://market.android.com/details?id=air.com.riagora.flexgame&#038;feature=search_result#?t=W251bGwsMSwyLDEsImFpci5jb20ucmlhZ29yYS5mbGV4Z2FtZSJd">Android Market</a> for your downloading pleasure <img src='http://devgirl.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> !</p>
<p>The Game of Flex consists of 16 questions which if answered correctly, will qualify you to win a free copy of <a href="https://www.adobe.com/cfusion/tdrc/index.cfm?product=flash_builder">Flash Builder 4.6</a>! Ultimately though, it&#8217;s a learning tool, where we&#8217;ve included samples and source code for all of the new 4.6 features and other useful mobile features. Click the &#8216;Snippet&#8217; button to get the source code for the sample within the app, and the &#8216;Tutorial&#8217; button to link to tutorials with more details on how to use a certain feature.</p>
<p>Be sure to check out <a href="http://flex.org/flexgame/">Michael&#8217;s post</a> about the game, and visit the official website for it <a href="http://www.riagora.com/2011/12/game-of-flex-on-tablets/">here</a>!</p>
<div align="center"><strong>Sample Question</strong><br />
<a href="http://devgirl.org/wp-content/uploads/2011/12/flexgame-sample1.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/flexgame-sample1.png" alt="" title="flexgame-sample" width="500" height="375" class="aligncenter size-full wp-image-3618" /></a></p>
<p><strong>Sample Code Snippet</strong><br />
<a href="http://devgirl.org/wp-content/uploads/2011/12/flexgame-code.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/flexgame-code.png" alt="" title="flexgame-code" width="500" height="375" class="aligncenter size-full wp-image-3619" /></a>
</div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdevgirl.org%2F2011%2F12%2F07%2Fgame-of-flex-for-tablets-released%2F&amp;title=Game%20of%20Flex%20for%20Tablets%20Released%21" id="wpa2a_6"><img src="http://devgirl.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://devgirl.org/2011/12/07/game-of-flex-for-tablets-released/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Flex Mobile Development &#8211; Adding Maps with the MapQuest AS3/Flash API!</title>
		<link>http://devgirl.org/2011/12/06/flex-mobile-development-adding-maps-with-mapquest-flash-api-w-sample-app/</link>
		<comments>http://devgirl.org/2011/12/06/flex-mobile-development-adding-maps-with-mapquest-flash-api-w-sample-app/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 20:13:17 +0000</pubDate>
		<dc:creator>Holly Schinsky</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Flash Builder 4.6]]></category>
		<category><![CDATA[Flex 4.5]]></category>
		<category><![CDATA[Flex 4.5/Mobile]]></category>
		<category><![CDATA[Flex 4.6]]></category>
		<category><![CDATA[Flex Mobile]]></category>
		<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[AIR Mobile Maps]]></category>
		<category><![CDATA[Flash Maps API]]></category>
		<category><![CDATA[Flex Maps]]></category>
		<category><![CDATA[Flex Maps API]]></category>
		<category><![CDATA[Flex Mobile Maps]]></category>
		<category><![CDATA[MapQuest]]></category>
		<category><![CDATA[MapQuest AS3 API]]></category>

		<guid isPermaLink="false">http://devgirl.org/?p=3562</guid>
		<description><![CDATA[A topic that has come up often in my conversations with developers lately is how to easily add mapping components to their their Flex and Flash mobile apps. Now I&#8217;m super excited to share this latest AS3/Flash API for mobile from MapQuest for everyone to check out! The new version contains touch-friendly maps and controls [...]]]></description>
			<content:encoded><![CDATA[<p>A topic that has come up often in my conversations with developers lately is how to easily add mapping components to their their Flex and Flash mobile apps. Now I&#8217;m super excited to share this <a href="http://developer.mapquest.com/web/products/featured/as3-flex-flash-mobile">latest AS3/Flash API for mobile from MapQuest</a> for everyone to check out! The new version contains touch-friendly maps and controls and was streamlined for performance on mobile. </p>
<p>To get started, first check out <a href="http://devgirl.org/files/MapQuestSample/">this sample application</a> I&#8217;ve included the <a href="http://devgirl.org/files/MapQuestSample/MQMobileSample%283%29/">source</a> and <a href="http://devgirl.org/files/MapQuestSample/MQMobileSample.fxp">fxp</a> for that was written by my friend <a href="http://twitter.com/@MapQuestTech">Darin Weakley</a> over at <a href="http://www.mapquest.com/">MapQuest</a>. He&#8217;s done a great job of showcasing the fun cool features available in this app. I&#8217;ve included some screen shots below to give an idea of what it entails:</p>
<div align="center"><strong><br />
<h2>Map Component</h2>
<p></strong></div>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/mqmaps.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/mqmaps.png" alt="" title="mqmaps" width="500" height="710" class="aligncenter size-full wp-image-3564" /></a></p>
<div align="center"><strong><br />
<h2>Search Business</h2>
<p></strong></p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/mqstarbucks0.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/mqstarbucks0.png" alt="" title="Starbucks Search" width="500" height="771" class="aligncenter size-full wp-image-3572" /></a></p>
<p><strong><br />
<h2>Search Results</h2>
<p></strong></p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/mqstarbucks1.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/mqstarbucks1.png" alt="" title="Search Results" width="500" height="771" class="aligncenter size-full wp-image-3573" /></a></p>
<p><strong><br />
<h2>Results on Map</h2>
<p></strong></p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/mqstarbucksmap.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/mqstarbucksmap.png" alt="" title="Search Results on Map" width="500" height="771" class="aligncenter size-full wp-image-3574" /></a></p>
<p><strong><br />
<h2>Result Item Detail</h2>
<p></strong></p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/mqstarbucks2.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/mqstarbucks2.png" alt="" title="Search Detail" width="500" height="771" class="aligncenter size-full wp-image-3575" /></a></p>
<p><strong><br />
<h2>Directions</h2>
<p></strong></p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/mqdirectionstext.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/mqdirectionstext.png" alt="" title="Directions Text" width="500" height="771" class="aligncenter size-full wp-image-3596" /></a><br />
<strong><br />
<h2>Directions by Map</h2>
<p></strong></p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/mqdirectionsmap.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/mqdirectionsmap.png" alt="" title="Directions on Map" width="500" height="771" class="aligncenter size-full wp-image-3594" /></a>
</div>
<p>If you have an Android device, be sure to download the <a href="https://market.android.com/details?id=air.com.mapquestapi.www&#038;feature=search_result">showcase application</a> for free to your device!</p>
<p>To implement this in your own app you will need to <a href="http://developer.mapquest.com/">create yourself an app key and join the developer program</a> here before using the APIs. It&#8217;s fast and easy. Click &#8216;Join Now&#8217;. Also, don&#8217;t forget to include the <a href="http://developer.mapquest.com/content/as3/v7/7.0.7_MQ_MOBILE/downloads/MQFlashMapsAPI_7.0.7_MQ_MOBILE.swc">latest MapQuest Flash API 7.07 mobile swc file</a> in your project (see the sample for reference). <a href=" http://developer.mapquest.com/web/products/featured/as3-flex-flash-mobile">This link</a> also has documentation and other examples on the right side of the page to check out for more info!</p>
<p><strong><br />
<h3>MapQuest Flash Maps API Quick Links</h3>
<p><a href="http://developer.mapquest.com/web/products/featured/as3-flex-flash-mobile">Mobile Flash Maps API</a><br />
<a href="http://developer.mapquest.com/web/products/featured/as3-flex-flash">Web/Desktop Flash Maps API</a><br />
<a href="http://developer.mapquest.com/web/products/open/flash-mobile">OpenStreetMap Mobile Flash Maps API</a> &#8211; more information about <a href="http://www.openstreetmap.org/index.html">OpenStreetMap (OSM)</a><br />
<a href="http://developer.mapquest.com/web/products/open/flash">OpenStreetMap Web/Desktop Flash Maps API</a> </strong></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdevgirl.org%2F2011%2F12%2F06%2Fflex-mobile-development-adding-maps-with-mapquest-flash-api-w-sample-app%2F&amp;title=Flex%20Mobile%20Development%20%26%238211%3B%20Adding%20Maps%20with%20the%20MapQuest%20AS3%2FFlash%20API%21" id="wpa2a_8"><img src="http://devgirl.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://devgirl.org/2011/12/06/flex-mobile-development-adding-maps-with-mapquest-flash-api-w-sample-app/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Flex Mobile Development &#8211; SplitViewNavigator Tutorial (w/ source)</title>
		<link>http://devgirl.org/2011/12/01/flex-mobile-development-splitviewnavigator-tutorial/</link>
		<comments>http://devgirl.org/2011/12/01/flex-mobile-development-splitviewnavigator-tutorial/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 16:09:35 +0000</pubDate>
		<dc:creator>Holly Schinsky</dc:creator>
				<category><![CDATA[Flash Builder 4.6]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex 4.5]]></category>
		<category><![CDATA[Flex 4.5/Mobile]]></category>
		<category><![CDATA[Flex 4.6]]></category>
		<category><![CDATA[Flex Mobile]]></category>
		<category><![CDATA[Flex Master/Detail View]]></category>
		<category><![CDATA[Flex Split View]]></category>
		<category><![CDATA[Flex SplitViewNavigator]]></category>
		<category><![CDATA[SplitViewNavigator]]></category>

		<guid isPermaLink="false">http://devgirl.org/?p=3223</guid>
		<description><![CDATA[The SplitViewNavigator is another new Flex 4.6 component targeted for tablet development that can be used when you want to create a master view / detail view in your application, where the master view typically serves as a source of navigation and the detail view displays the results of the action taken on the master [...]]]></description>
			<content:encoded><![CDATA[<p>The <strong>SplitViewNavigator</strong> is another new Flex 4.6 component targeted for tablet development that can be used when you want to create a master view / detail view in your application, where the master view typically serves as a source of navigation and the detail view displays the results of the action taken on the master view. The master view is typically the left or top of the screen, and the detail view is typically the right side or bottom part of the screen depending on layout. If you&#8217;re not familiar with this screen pattern, see <a href="http://designingwebinterfaces.com/designing-web-interfaces-12-screen-patterns">this link</a> for more detail. A great example of this is your typical mail application, for instance on one of my iPad email accounts:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/svn01.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/svn01.png" alt="" title="svn0" width="500" height="375" class="aligncenter size-full wp-image-3522" /></a></p>
<p>Now we can build applications with this type of layout simply using built-in Flex 4.6 features! The <strong>SplitViewNavigator</strong> extends<strong> ViewNavigatorBase</strong>, so it does not reside at the root level of the application but rather at the child level similar to <strong>ViewNavigator</strong>. Note that this component can only be used in a blank <strong>Application</strong> or within a <strong>TabbedViewNavigatorApplication</strong>. Here&#8217;s an example:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Application xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
			   xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot; applicationDPI=&quot;160&quot;&gt;

	&lt;s:SplitViewNavigator id=&quot;svn&quot; width=&quot;100%&quot; height=&quot;100%&quot;&gt;
		&lt;s:ViewNavigator id=&quot;leftNav&quot; width=&quot;30%&quot; height=&quot;100%&quot; firstView=&quot;views.LeftView&quot;/&gt;
		&lt;s:ViewNavigator id=&quot;rightNav&quot; width=&quot;100%&quot; height=&quot;100%&quot; firstView=&quot;views.RightView&quot;/&gt;
	&lt;/s:SplitViewNavigator&gt;
&lt;/s:Application&gt;
</pre>
<p>In this case my left view and right view are simple <strong>View</strong> classes showing a list of cities to click on and some dummy data about that particular city in the detail. I&#8217;ve included the code below for reference:</p>
<p><strong>LeftView.mxml</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:View xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
		xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot; title=&quot;Left View&quot;&gt;

	&lt;fx:Script&gt;
		&lt;![CDATA[
			protected function list_clickHandler(event:MouseEvent):void
			{
				(this.parentDocument as Sample).rightNav.activeView.data=list.selectedItem;
			}
		]]&gt;
	&lt;/fx:Script&gt;

	&lt;s:List id=&quot;list&quot; width=&quot;100%&quot; height=&quot;100%&quot; click=&quot;list_clickHandler(event)&quot;&gt;
		&lt;s:dataProvider&gt;
			&lt;s:ArrayCollection&gt;
				&lt;fx:String&gt;Atlanta, GA&lt;/fx:String&gt;
				&lt;fx:String&gt;Baltimore, MD&lt;/fx:String&gt;
				&lt;fx:String&gt;Boston, MA&lt;/fx:String&gt;
				&lt;fx:String&gt;Chicago, IL&lt;/fx:String&gt;
				&lt;fx:String&gt;Dallas, TX&lt;/fx:String&gt;
				&lt;fx:String&gt;Detroit, MI&lt;/fx:String&gt;
				&lt;fx:String&gt;Honolulu, HI&lt;/fx:String&gt;
				&lt;fx:String&gt;Los Angeles, CA&lt;/fx:String&gt;
				&lt;fx:String&gt;Minneapolis, MA&lt;/fx:String&gt;
				&lt;fx:String&gt;New Orleans, LA&lt;/fx:String&gt;
				&lt;fx:String&gt;New York, NY&lt;/fx:String&gt;
				&lt;fx:String&gt;Richmond, VA&lt;/fx:String&gt;
				&lt;fx:String&gt;San Francisco, CA&lt;/fx:String&gt;
				&lt;fx:String&gt;San Jose, CA&lt;/fx:String&gt;
				&lt;fx:String&gt;St. Louis, MO&lt;/fx:String&gt;
				&lt;fx:String&gt;Washington, DC&lt;/fx:String&gt;
			&lt;/s:ArrayCollection&gt;
		&lt;/s:dataProvider&gt;
	&lt;/s:List&gt;
&lt;/s:View&gt;
</pre>
<p><strong>RightView.mxml</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:View xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot; xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot; title=&quot;Detail View&quot;&gt;
	&lt;s:layout&gt;
		&lt;s:VerticalLayout paddingTop=&quot;15&quot; paddingBottom=&quot;15&quot; paddingLeft=&quot;15&quot; paddingRight=&quot;15&quot; gap=&quot;5&quot;
						  horizontalAlign=&quot;center&quot; verticalAlign=&quot;top&quot;/&gt;
	&lt;/s:layout&gt;
	&lt;s:Label text=&quot;Click on a location on the left to explore!&quot; visible=&quot;{data==null?true:false}&quot;/&gt;
	&lt;s:Label text=&quot;Information about {this.data}&quot; visible=&quot;{data!=null?true:false}&quot;/&gt;

	&lt;s:TextArea text=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur accumsan felis ac tortor aliquam iaculis. Phasellus hendrerit viverra enim, sit amet scelerisque lectus dictum at. Aenean sodales nisi sed leo congue et porttitor ligula vehicula.
Pellentesque turpis massa, suscipit vel fermentum quis, dignissim sed ipsum. Nulla aliquet libero adipiscing risus lobortis eleifend quis at velit. Duis at leo urna.
Praesent facilisis faucibus neque, ut ullamcorper lacus gravida a. Donec vel iaculis sapien.&quot;  width=&quot;90%&quot; editable=&quot;false&quot; visible=&quot;{data!=null?true:false}&quot;/&gt;
&lt;/s:View&gt;
</pre>
<p>The resulting application:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/svnLand.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/svnLand.png" alt="" title="svnLand" width="500" height="385" class="aligncenter size-full wp-image-3531" /></a></p>
<p>You could also set a layout on the <strong>SplitViewNavigator</strong> container so if you wanted it to split vertically for instance, you would simply set a <strong>VerticalLayout</strong>, and adjust the height percentages with the width set to 100%, such as:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:SplitViewNavigator id=&quot;svn&quot; width=&quot;100%&quot; height=&quot;100%&quot;&gt;
	&lt;s:layout&gt;
	     &lt;s:VerticalLayout/&gt;
	&lt;/s:layout&gt;
	&lt;s:ViewNavigator id=&quot;leftNav&quot; width=&quot;100%&quot; height=&quot;30%&quot; firstView=&quot;views.LeftView&quot;/&gt;
	&lt;s:ViewNavigator id=&quot;rightNav&quot; width=&quot;100%&quot; height=&quot;70%&quot; firstView=&quot;views.RightView&quot;/&gt;
&lt;/s:SplitViewNavigator&gt;
</pre>
<p>Here&#8217;s the updated layout:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/svnVert.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/svnVert.png" alt="" title="svnVert" width="500" height="385" class="aligncenter size-full wp-image-3539" /></a></p>
<p>This split view approach works well for landscape mode, however, in portrait mode you may want to display it a little differently since the screen width is much less to work with. There are some built-in features to help you do this. There&#8217;s an <em>autoHideFirstViewNavigator</em> property on the <strong>SplitViewNavigator</strong> that will automatically hide the left side view when the application receives an orientation change event to portrait. </p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:SplitViewNavigator id=&quot;svn&quot; width=&quot;100%&quot; height=&quot;100%&quot; autoHideFirstViewNavigator=&quot;true&quot;&gt;
	&lt;s:ViewNavigator id=&quot;leftNav&quot; width=&quot;30%&quot; height=&quot;100%&quot; firstView=&quot;views.LeftView&quot;/&gt;
	&lt;s:ViewNavigator id=&quot;rightNav&quot; width=&quot;100%&quot; height=&quot;100%&quot; firstView=&quot;views.RightView&quot;/&gt;
&lt;/s:SplitViewNavigator&gt;
</pre>
<p>Now when we run it, we will see the following:<br />
<a href="http://devgirl.org/wp-content/uploads/2011/12/svnAuto.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/svnAuto.png" alt="" title="svnAuto" width="500" height="619" class="aligncenter size-full wp-image-3533" /></a></p>
<p>Not very useful yet though since there&#8217;s no way to navigate to a different item in our list! So we need to take this one step further and use the <strong>showViewNavigatorInPopUp</strong> function from the <strong>SplitViewNavigator</strong> to pop up our list in a <strong>Callout</strong> while in portrait mode. We can call this function from a button in the right ViewNavigator&#8217;s actionBar <em>navigationContent</em> for instance such as the following:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:SplitViewNavigator id=&quot;svn&quot; width=&quot;100%&quot; height=&quot;100%&quot; autoHideFirstViewNavigator=&quot;true&quot;&gt;
		&lt;s:ViewNavigator id=&quot;leftNav&quot; width=&quot;30%&quot; height=&quot;100%&quot; firstView=&quot;views.LeftView&quot;/&gt;
		&lt;s:ViewNavigator id=&quot;rightNav&quot; width=&quot;100%&quot; height=&quot;100%&quot; firstView=&quot;views.RightView&quot; &gt;
			&lt;s:navigationContent&gt;
				&lt;s:Button id=&quot;listButton&quot; label=&quot;List&quot; click=&quot;svn.showFirstViewNavigatorInPopUp(listButton)&quot;/&gt;
			&lt;/s:navigationContent&gt;
		&lt;/s:ViewNavigator&gt;
&lt;/s:SplitViewNavigator&gt;
</pre>
<p>Note: Just to clarify, in the above we are using the actionBar already implicitly defined as part of the Spark ViewNavigator container and setting the parent for the popup to the listButton, so the Callout or popup arrow will stem from that button. Here&#8217;s what the above code will look like when run in portrait mode:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/svnPortrait.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/svnPortrait.png" alt="" title="svnPortrait" width="500" height="619" class="aligncenter size-full wp-image-3532" /></a></p>
<p>At this point, we probably don&#8217;t want this button to show though when going back into landscape mode, so we&#8217;ll need to add states management to set visible to false when in landscape. One way to determine when to update the state would be to add a resize event handler and check the width and height and update the state accordingly. Our code now looks like the following:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Application xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
			   xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot; applicationDPI=&quot;160&quot; resize=&quot;application1_resizeHandler(event)&quot;&gt;
	&lt;fx:Script&gt;
		&lt;![CDATA[
			import mx.events.ResizeEvent;

			protected function application1_resizeHandler(event:ResizeEvent):void
			{
				if (width&gt;height)
					this.currentState=&quot;landscape&quot;;
				else this.currentState=&quot;portrait&quot;;
			}
		]]&gt;
	&lt;/fx:Script&gt;

	&lt;s:states&gt;
		&lt;s:State name=&quot;portrait&quot;/&gt;
		&lt;s:State name=&quot;landscape&quot;/&gt;
	&lt;/s:states&gt;

	&lt;s:SplitViewNavigator id=&quot;svn&quot; width=&quot;100%&quot; height=&quot;100%&quot; autoHideFirstViewNavigator=&quot;true&quot;&gt;
		&lt;s:ViewNavigator id=&quot;leftNav&quot; width=&quot;30%&quot; height=&quot;100%&quot; firstView=&quot;views.LeftView&quot;/&gt;
		&lt;s:ViewNavigator id=&quot;rightNav&quot; width=&quot;100%&quot; height=&quot;100%&quot; firstView=&quot;views.RightView&quot; &gt;
			&lt;s:navigationContent&gt;
				&lt;s:Button id=&quot;listButton&quot; label=&quot;List&quot; click=&quot;svn.showFirstViewNavigatorInPopUp(listButton)&quot; visible.landscape=&quot;false&quot;/&gt;
			&lt;/s:navigationContent&gt;
		&lt;/s:ViewNavigator&gt;
	&lt;/s:SplitViewNavigator&gt;
&lt;/s:Application&gt;
</pre>
<p>Now when we run the application in landscape mode, we can see the List button is not showing in the actionBar:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/svnLand.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/svnLand.png" alt="" title="svnLand" width="500" height="385" class="aligncenter size-full wp-image-3531" /></a></p>
<p>You can download the source and project file for this sample application <strong><a href="http://devgirl.org/files/SplitViewNavigatorSample/">here</a></strong>!</p>
<p>Also, if you haven&#8217;t looked at this yet, <a href="http://coenraets.org">Christophe</a> and I created an extensive SplitViewNavigator-based expense tracking tablet application called <strong><em>XpenseIt</em></strong> that includes a bunch of other Flex 4.6 features as well and can be downloaded <a href="http://devgirl.org/files/RIAUnleashed/">here</a>. Here is a screenshot from that application:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/12/svn2.png"><img src="http://devgirl.org/wp-content/uploads/2011/12/svn2.png" alt="" title="XpenseIt" width="500" height="385" class="aligncenter size-full wp-image-3503" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdevgirl.org%2F2011%2F12%2F01%2Fflex-mobile-development-splitviewnavigator-tutorial%2F&amp;title=Flex%20Mobile%20Development%20%26%238211%3B%20SplitViewNavigator%20Tutorial%20%28w%2F%20source%29" id="wpa2a_10"><img src="http://devgirl.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://devgirl.org/2011/12/01/flex-mobile-development-splitviewnavigator-tutorial/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Flex Mobile Development &#8211; Flex 4.6 Cool New Soft Keyboard Features &#8211; sample w/ source!</title>
		<link>http://devgirl.org/2011/11/29/flex-mobile-development-flex-4-6-cool-new-soft-keyboard-features-sample-w-source/</link>
		<comments>http://devgirl.org/2011/11/29/flex-mobile-development-flex-4-6-cool-new-soft-keyboard-features-sample-w-source/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 16:43:47 +0000</pubDate>
		<dc:creator>Holly Schinsky</dc:creator>
				<category><![CDATA[Flash Builder 4.6]]></category>
		<category><![CDATA[Flex 4.5]]></category>
		<category><![CDATA[Flex 4.5/Mobile]]></category>
		<category><![CDATA[Flex 4.6]]></category>
		<category><![CDATA[Flex autoCorrect]]></category>
		<category><![CDATA[Flex mobile autCapitalize]]></category>
		<category><![CDATA[Flex mobile autoCorrect]]></category>
		<category><![CDATA[Flex mobile return key]]></category>
		<category><![CDATA[Flex mobile soft keyboard]]></category>
		<category><![CDATA[Flex Soft Keyboard]]></category>
		<category><![CDATA[Flex softKeyboardType]]></category>

		<guid isPermaLink="false">http://devgirl.org/?p=3445</guid>
		<description><![CDATA[Flex 4.6 (release going public TODAY &#8211; I will update this post with the link as soon as I have it) &#8211; includes some nice soft keyboard enhancements to be aware of, including setting a certain type of keyboard or setting the default return key lable, and even auto-correcting and auto-capitalizing text. This post will [...]]]></description>
			<content:encoded><![CDATA[<p>Flex 4.6 (release going public TODAY &#8211; I will update this post with the link as soon as I have it) &#8211; includes some nice soft keyboard enhancements to be aware of, including setting a certain type of keyboard or setting the default return key lable, and even auto-correcting and auto-capitalizing text. This post will show how to use each of them along with some sample code. The sample application is basically just a bunch of text fields with labels identifying which feature or option is set on that particular field so when you tap to type into it you should see the effect of the setting on either the soft keyboard or the text. The <a href="http://devgirl.org/files/SoftKeyboardOptionsSample/">src/ folder and fxp</a> are included for reference or download so you can try it out yourself as well.</p>
<p><strong>softKeyboardType</strong><br />
There&#8217;s a new <em>softKeyboardType</em> property on the <strong>TextInput</strong> and <strong>TextArea</strong> components that will allow you to set the different soft keyboard types available on mobile devices. The value for this property could be set to any one of the following <strong>number, email, punctuation, url, contact</strong> or <strong>default</strong>, and will invoke the native soft keyboard of that type on the given device. </p>
<p>For example, this snippet of code from the sample project I&#8217;m including with this post sets the keyboard type to <strong>number</strong>:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:VGroup verticalAlign=&quot;middle&quot;&gt;
	&lt;s:Label text=&quot;Soft Keyboard=Number&quot;/&gt;
	&lt;s:TextInput softKeyboardType=&quot;number&quot; width=&quot;180&quot;/&gt;
&lt;/s:VGroup&gt;
</pre>
<p>Here&#8217;s how this looks on the iPad 2 with the above code when I tap into the text field:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/sk-number.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/sk-number.png" alt="" title="sk-number" width="500" height="667" class="aligncenter size-full wp-image-3456" /></a></p>
<p>And here we can see how it looks on the Android Galaxy Tablet:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/android-number.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/android-number.png" alt="" title="android-number" width="500" height="800" class="aligncenter size-full wp-image-3453" /></a></p>
<p>On the iPhone 4, you would get this keyboard when it&#8217;s set to number:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/number-keyboard.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/number-keyboard.png" alt="" title="number-keyboard" width="500" height="333" class="aligncenter size-full wp-image-3448" /></a></p>
<p>Compare this to the default soft keyboard on the iPhone:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/default-keyboard-photo.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/default-keyboard-photo.png" alt="" title="default-keyboard-photo" width="500" height="333" class="aligncenter size-full wp-image-3449" /></a></p>
<p><strong>returnKeyLabel</strong><br />
There&#8217;s another new property for <em>returnKeyLabel</em> that can be used for customizing the label on the return key to one of the following: <strong>search, next, go, done </strong>(the default is simply <strong>return</strong> <img src='http://devgirl.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )  </p>
<p>Here&#8217;s a code snippet of how it&#8217;s used:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:TextInput returnKeyLabel=&quot;go&quot; width=&quot;150&quot;/&gt;
&lt;s:TextInput returnKeyLabel=&quot;search&quot; width=&quot;150&quot;/&gt;
</pre>
<p>Here&#8217;s a screenshot of how it looks on the iPad 2 when set to <strong>search</strong>:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/return-search.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/return-search.png" alt="" title="return-search" width="500" height="667" class="aligncenter size-full wp-image-3457" /></a></p>
<p>And on the Android Galaxy Tablet when set to <strong>go</strong>:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/android-go1.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/android-go1.png" alt="" title="android-go" width="500" height="800" class="aligncenter size-full wp-image-3459" /></a></p>
<p><strong>autoCapitalize and autoCorrect</strong><br />
You can also set an <em>autoCapitalize</em> property on a text field to automatically capitalize for you while your typing your text messages etc. The values for <em>autoCapitalize</em> are <strong>all, word, sentence and none</strong>. </p>
<p>Also, most people are familiar with mobile devices performing an auto-correction or suggestion for words while they&#8217;re typing a text message or email etc, and Flex 4.6 now has support for this. You can simply set the <em>autoCorrect</em> property to true and it will suggest fixes to your misspelled words. </p>
<p>It&#8217;s very easy to add these features to your code, here&#8217;s an example:</p>
<pre class="brush: xml; title: ; notranslate">
	&lt;s:TextInput autoCapitalize=&quot;sentence&quot; width=&quot;150&quot;/&gt;
	&lt;s:TextInput autoCorrect=&quot;true&quot; width=&quot;150&quot;/&gt;
</pre>
<p>Followed by a screenshot from it running on the iPad 2:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/auto-cap-correct.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/auto-cap-correct.png" alt="" title="auto-cap-correct" width="500" height="667" class="aligncenter size-full wp-image-3452" /></a></p>
<p>You will actually notice the Caps Lock button turn on while you&#8217;re typing on the keyboard and the rule calls for a capital letter. Here&#8217;s a screenshot of typing into a field on the Android Galaxy Tablet while I&#8217;m in a text field with the <em>autoCapitalize</em> set to <strong>all</strong>:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/auto-cap-all-android.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/auto-cap-all-android.png" alt="" title="auto-cap-all-android" width="500" height="800" class="aligncenter size-full wp-image-3471" /></a></p>
<p>Note that you can combine these properties as needed so you could do something like:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:TextInput softKeyboardType=&quot;contact&quot; autoCorrect=&quot;true&quot; autoCapitalize=&quot;word&quot; returnKeyLabel=&quot;search&quot; width=&quot;150&quot;/&gt;
</pre>
<p>The sample source and fxp for this project is available <a href="http://devgirl.org/files/SoftKeyboardOptionsSample/"><strong>HERE</strong></a>!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdevgirl.org%2F2011%2F11%2F29%2Fflex-mobile-development-flex-4-6-cool-new-soft-keyboard-features-sample-w-source%2F&amp;title=Flex%20Mobile%20Development%20%26%238211%3B%20Flex%204.6%20Cool%20New%20Soft%20Keyboard%20Features%20%26%238211%3B%20sample%20w%2F%20source%21" id="wpa2a_12"><img src="http://devgirl.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://devgirl.org/2011/11/29/flex-mobile-development-flex-4-6-cool-new-soft-keyboard-features-sample-w-source/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>Flex is Alive!</title>
		<link>http://devgirl.org/2011/11/17/flex-is-alive/</link>
		<comments>http://devgirl.org/2011/11/17/flex-is-alive/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 16:02:50 +0000</pubDate>
		<dc:creator>Holly Schinsky</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex announcement]]></category>

		<guid isPermaLink="false">http://devgirl.org/?p=3389</guid>
		<description><![CDATA[Flex folks, first of all, today there&#8217;s a new official statement out on the Adobe website about Adobe&#8217;s commitments to the Flash Platform including plans for Flex that you should be aware of. Secondly there&#8217;s a new post from the Product Management team out now summarizing the recent Flex Q&#038;A. There&#8217;s been a lot of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://devgirl.org/wp-content/uploads/2011/11/alive.jpg"><img src="http://devgirl.org/wp-content/uploads/2011/11/alive-300x214.jpg" alt="" title="alive" width="300" height="214" class="aligncenter size-medium wp-image-3397" /></a><br />
Flex folks, first of all, today there&#8217;s a <a href="http://www.adobe.com/devnet/flashplatform/articles/recent-updates.html">new official statement</a> out on the Adobe website about Adobe&#8217;s commitments to the Flash Platform including plans for Flex that you should be aware of. Secondly there&#8217;s a <a href="http://www.adobe.com/devnet/flex/articles/flex-announcements.html">new post</a> from the Product Management team out now summarizing the recent Flex Q&#038;A.  There&#8217;s been a lot of frustration in the community (which I understand and can personally relate to having been part of the community myself for a very long time) and I wish that the sequence of events (and frankly the communication) did not happen as it did, but it is what it is at this point and we need to carry on. I hope people can see this move of Flex to an Apache model with dedicated full-time engineering resources in San Francisco as the good news that it is!! Flex is alive and well and will continue to grow as the dust settles. Even now we can build <a href="http://flex.org/showcase.php">amazing applications</a> over many other technologies in half the amount of time with it in its current state. And the growth in Flex and AIR for mobile is allowing us to do some super cool and fun stuff which is about to just get better with the <a href="http://www.adobe.com/devnet/flex/articles/whats-new-flex-flash-builder-46.html">upcoming release of Flex 4.6</a> in a couple weeks!</p>
<p>I realize people&#8217;s trust is tarnished and people are scorned and angry, but please try to remove your emotions from the equation and look at this for what it is. Any good developer knows that technology is ever-changing and you have to ride the current wave. It&#8217;s evident that HTML 5/JavaScript is gaining ground and needs to be kept on our radar of things to be learning (whether we love it or not). It should also be considered as an option right now for certain applications where it makes more sense. As much as I am passionate about Flex myself, it can be overkill for many applications. And what better way to refine our skills in the HTML/JS arena by actually building some apps to gain the experience. As we all know though, there are still a ton of applications where it makes more sense to use Flex (enterprise and many mobile AIR apps) and fortunately we still have that option! </p>
<p>I know many of you are having to answer some tough questions from your clients and management about all of this, I hope <a href="http://www.adobe.com/devnet/flashplatform/articles/recent-updates.html/">today&#8217;s statements</a> can help in that respect. If there was a way I could change how things happened myself or wave a magic do-over wand I would in a heartbeat <img src='http://devgirl.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . This has not been easy for any of us. I just hope we can now start channeling our frustrations into something more positive and productive and get back to having some fun! </p>
<p>I will continue to post any updates on the move to Apache as I find out. Start thinking about how you might be able to contribute <img src='http://devgirl.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> !</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdevgirl.org%2F2011%2F11%2F17%2Fflex-is-alive%2F&amp;title=Flex%20is%20Alive%21" id="wpa2a_14"><img src="http://devgirl.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://devgirl.org/2011/11/17/flex-is-alive/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Flex Mobile Development &#8211; DateSpinner Sample (with source)!</title>
		<link>http://devgirl.org/2011/11/17/flex-mobile-development-datespinner-sample-with-source/</link>
		<comments>http://devgirl.org/2011/11/17/flex-mobile-development-datespinner-sample-with-source/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 14:13:11 +0000</pubDate>
		<dc:creator>Holly Schinsky</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Flex 4.5]]></category>
		<category><![CDATA[Flex 4.5/Mobile]]></category>
		<category><![CDATA[Flex 4.6]]></category>
		<category><![CDATA[Flex Mobile]]></category>
		<category><![CDATA[DateSpinner]]></category>
		<category><![CDATA[Flex Date Selection]]></category>
		<category><![CDATA[Flex Date Time]]></category>
		<category><![CDATA[Flex Mobile Date]]></category>
		<category><![CDATA[Flex Mobile DateSpinner]]></category>

		<guid isPermaLink="false">http://devgirl.org/?p=3383</guid>
		<description><![CDATA[The next feature I want to highlight in the upcoming Flex 4.6 release is the new DateSpinner control. The DateSpinner allows you to represent and select a date and/or time through a custom-skinned set of SpinnerList controls out of the box in Flex 4.6. Here&#8217;s an example: If you take a look at the DateSpinner.as [...]]]></description>
			<content:encoded><![CDATA[<p>The next feature I want to highlight in the upcoming Flex 4.6 release is the new <strong>DateSpinner</strong> control. The <strong>DateSpinner</strong> allows you to represent and select a date and/or time through a custom-skinned set of <strong>SpinnerList </strong>controls out of the box in Flex 4.6. Here&#8217;s an example:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/DateSpin12.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/DateSpin12.png" alt="" title="DateSpin1" width="500" height="413" class="aligncenter size-full wp-image-3407" /></a><br />
If you take a look at the <strong>DateSpinner.as</strong> source code in the SDK, you will see there are a number of <strong>SpinnerList</strong> controls defined as properties within it to use for repesenting the year, month, day etc to make up this <strong>DateSpinner</strong>:</p>
<pre class="brush: as3; title: ; notranslate">
 /**
     *  The SpinnerList that shows the year field of the date.
     *
     *  @langversion 3.0
     *  @playerversion AIR 3
     *  @productversion Flex 4.6
     */
    protected var yearList:SpinnerList;

    /**
     *  The SpinnerList that shows the month field of the date.
     *
     *  @langversion 3.0
     *  @playerversion AIR 3
     *  @productversion Flex 4.6
     */
    protected var monthList:SpinnerList;

    /**
     *  The SpinnerList that shows the date field of the date.
     *
     *  @langversion 3.0
     *  @playerversion AIR 3
     *  @productversion Flex 4.6
     */
    protected var dateList:SpinnerList;
</pre>
<p><strong>selectedDate</strong><br />
The current date is shown by default on the DateSpinner control, however you can select a different date by setting the <strong>selectedDate</strong> property such as in the following where I&#8217;m setting the date to the last day of the year (remember the month offset starts at 0 so we would use 11 instead of 12 for the month value):</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:DateSpinner id=&quot;dt&quot; selectedDate=&quot;{new Date(2011,11,31)}&quot; displayMode=&quot;{rg.selectedValue}&quot;/&gt;
</pre>
<p>Here&#8217;s the result:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/DateSpin4.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/DateSpin4.png" alt="" title="DateSpin4" width="500" height="398" class="aligncenter size-full wp-image-3411" /></a></p>
<p><strong>displayMode</strong><br />
The <em>displayMode</em> property is used to control what to display in the <strong>DateSpinner</strong>, and can be set to show the date, time or date and time. The <strong>spark.components.calendarClasses.DateSelectorDisplayMode</strong> class can be used to set this property to a predefined constant such as shown in the code below:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- Demonstrates new DateSpinner component --&gt;
&lt;s:View xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
		xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot; title=&quot;DateSpinner Sample&quot;&gt;
	&lt;fx:Script&gt;
		&lt;![CDATA[
			import spark.components.calendarClasses.DateSelectorDisplayMode;
		]]&gt;
	&lt;/fx:Script&gt;

	&lt;fx:Declarations&gt;
		&lt;s:RadioButtonGroup id=&quot;rg&quot;/&gt;
	&lt;/fx:Declarations&gt;

	&lt;s:layout&gt;
		&lt;s:VerticalLayout paddingTop=&quot;15&quot; paddingBottom=&quot;15&quot; paddingLeft=&quot;15&quot; paddingRight=&quot;15&quot; gap=&quot;15&quot;
						  horizontalAlign=&quot;center&quot; verticalAlign=&quot;top&quot;/&gt;
	&lt;/s:layout&gt;

	&lt;s:TextArea width=&quot;90%&quot; editable=&quot;false&quot; skinClass=&quot;spark.skins.mobile.TextAreaSkin&quot;
				text=&quot;The DateSpinner control is a specific SpinnerList control that can be used to represent and select a date and/or time. The displayMode property controls whether you're selecting the date, time or both date and time. &quot;/&gt;

	&lt;s:Label text=&quot;Select Display Mode&quot; /&gt;
	&lt;s:HGroup&gt;
		&lt;s:RadioButton label=&quot;{DateSelectorDisplayMode.DATE_AND_TIME}&quot; groupName=&quot;rg&quot; selected=&quot;true&quot;/&gt;
		&lt;s:RadioButton label=&quot;{DateSelectorDisplayMode.DATE}&quot; groupName=&quot;rg&quot;/&gt;
		&lt;s:RadioButton label=&quot;{DateSelectorDisplayMode.TIME}&quot; groupName=&quot;rg&quot;/&gt;
	&lt;/s:HGroup&gt;

	&lt;s:HGroup verticalAlign=&quot;middle&quot;&gt;
		&lt;s:DateSpinner id=&quot;dt&quot; displayMode=&quot;{rg.selectedValue}&quot;/&gt;
	&lt;/s:HGroup&gt;
	&lt;s:Label text=&quot;{dt.selectedDate}&quot;/&gt;
&lt;/s:View&gt;
</pre>
<p><strong>minDate/maxDate</strong><br />
You can specify a minimum or maximum date by using the <em>minDate</em> and <em>maxDate</em> properties to restrict the range of dates shown in the list using code such as the following:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:DateSpinner id=&quot;dt&quot; minDate=&quot;{new Date(2011,06,01)}&quot; maxDate=&quot;{new Date(2011,11,31)}&quot; displayMode=&quot;{rg.selectedValue}&quot;/&gt;
</pre>
<p><strong>minuteStepSize</strong><br />
If you&#8217;re displaying minutes (using TIME or DATE_AND_TIME mode), there is a <em>minuteStepSize</em> property that can be set to control the minutes increment. Here&#8217;s an example of how you would set the minutes to display in 10 minute increments:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:DateSpinner id=&quot;dt&quot; minuteStepSize=&quot;10&quot; minDate=&quot;{new Date(2011,06,01)}&quot; maxDate=&quot;{new Date(2011,11,31)}&quot; displayMode=&quot;{rg.selectedValue}&quot;/&gt;
</pre>
<p>And a screenshot showing how it displays:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/DateSpin2.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/DateSpin2.png" alt="" title="DateSpin2" width="500" height="407" class="aligncenter size-full wp-image-3406" /></a></p>
<p><strong>Current Date Color</strong><br />
By default the current (today&#8217;s) date is set to a light blue shade as shown in the first screenshot. You can change this color by simply setting an <em>accentColor</em> on your <strong>DateSpinner</strong> control such as:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:DateSpinner id=&quot;dt&quot; accentColor=&quot;red&quot; minDate=&quot;{new Date(2011,06,01)}&quot; maxDate=&quot;{new Date(2011,11,31)}&quot; displayMode=&quot;{rg.selectedValue}&quot;/&gt;
</pre>
<p>The result of setting this property is shown below:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/DateSpin3.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/DateSpin3.png" alt="" title="DateSpin Sample Color" width="500" height="288" class="aligncenter size-full wp-image-3409" /></a></p>
<p><strong>Styling the DateSpinner</strong><br />
You can style certain attributes on your <strong>DateSpinner</strong> to control the font color, indentation, letter spacing etc. Here&#8217;s an example showing some properties you may want to customize:</p>
<pre class="brush: as3; title: ; notranslate">
s|DateSpinner
{
	accentColor: magenta;
	color: blue;
	letterSpacing: 5;
	textIndent: 5;
	textDecoration: underline;
}
</pre>
<p>The result is shown here (not very realistic but you get the idea <img src='http://devgirl.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )!</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/DateSpin5.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/DateSpin5.png" alt="" title="DateSpin5" width="500" height="411" class="aligncenter size-full wp-image-3413" /></a></p>
<p>The source code and project for this sample can be found <a href="http://devgirl.org/files/DateSpinnerSample/">HERE</a> if you&#8217;d like to try this out! </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdevgirl.org%2F2011%2F11%2F17%2Fflex-mobile-development-datespinner-sample-with-source%2F&amp;title=Flex%20Mobile%20Development%20%26%238211%3B%20DateSpinner%20Sample%20%28with%20source%29%21" id="wpa2a_16"><img src="http://devgirl.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://devgirl.org/2011/11/17/flex-mobile-development-datespinner-sample-with-source/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Flex Mobile Development &#8211; SpinnerList Sample (with source code)</title>
		<link>http://devgirl.org/2011/11/14/flex-mobile-development-spinnerlist-sample-with-source-code/</link>
		<comments>http://devgirl.org/2011/11/14/flex-mobile-development-spinnerlist-sample-with-source-code/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 16:45:29 +0000</pubDate>
		<dc:creator>Holly Schinsky</dc:creator>
				<category><![CDATA[Flex 4.5]]></category>
		<category><![CDATA[Flex 4.5/Mobile]]></category>
		<category><![CDATA[Flex 4.6]]></category>
		<category><![CDATA[Flex Mobile]]></category>
		<category><![CDATA[Flex 4.6 SpinnerList Sample]]></category>
		<category><![CDATA[Flex Mobile List]]></category>
		<category><![CDATA[Flex SpinnerList]]></category>
		<category><![CDATA[Mobile List]]></category>
		<category><![CDATA[SpinnerList]]></category>

		<guid isPermaLink="false">http://devgirl.org/?p=3327</guid>
		<description><![CDATA[There was a lot of news from Adobe last week surrounding the Flash platform and Flex SDK (understatement !!) I know many have formed their own opinions on the state of affairs, but the bottom line is, we need to move forward now and be productive again. Flex 4.6 will launch soon and there are [...]]]></description>
			<content:encoded><![CDATA[<p>There was a lot of news from Adobe last week surrounding the Flash platform and Flex SDK (understatement <img src='http://devgirl.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> !!) I know many have formed their own opinions on the state of affairs, but the bottom line is, we need to move forward now and be productive again. <a href="http://www.adobe.com/devnet/flex/articles/whats-new-flex-flash-builder-46.html">Flex 4.6</a> will launch soon and there are some really cool new components that I want to continue to highlight prior to the launch. </p>
<p>The next in my series is the new <strong>SpinnerList</strong> component. It can be used to show a list of items that appears to wrap around an animated spinner control. The list shows five items by default. If you want to change the default number of items shown, you can create a custom skin. </p>
<p>Here&#8217;s an example of the <strong>SpinnerList</strong>:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/spinnerList1.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/spinnerList1.png" alt="" title="SpinnerList Sample" width="500" height="439" class="aligncenter size-full wp-image-3328" /></a></p>
<p>The sample code for the above <strong>View</strong> looks like the following:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:View xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
		xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot; title=&quot;Sample SpinnerList&quot; xmlns:r=&quot;renderers.*&quot;&gt;

	&lt;s:layout&gt;
		&lt;s:VerticalLayout paddingTop=&quot;40&quot; paddingBottom=&quot;5&quot; paddingLeft=&quot;5&quot; paddingRight=&quot;5&quot; gap=&quot;10&quot;
						  horizontalAlign=&quot;center&quot; verticalAlign=&quot;top&quot;/&gt;
	&lt;/s:layout&gt;

	&lt;s:TextArea width=&quot;90%&quot; editable=&quot;false&quot; skinClass=&quot;spark.skins.mobile.TextAreaSkin&quot;
				text=&quot;The SpinnerList control displays a list of items that wraps around an animated wheel. The item in the center is always the selected item. The list can be spun by upward and downward throws or by dragging up or down to select items or simply clicked to choose an item. You place this component in a SpinnerListContainer which provides the chrome and layout for it. The SpinnerListItemRenderer is the default item renderer which can also be overridden.&quot;/&gt;
	&lt;s:Label text=&quot;Select a location...&quot;/&gt;
	&lt;s:SpinnerListContainer width=&quot;200&quot;&gt;
		&lt;s:SpinnerList width=&quot;100%&quot;&gt;
			&lt;s:dataProvider&gt;
				&lt;s:ArrayCollection&gt;
					&lt;fx:String&gt;Boston, MA&lt;/fx:String&gt;
					&lt;fx:String&gt;Chicago, IL&lt;/fx:String&gt;
					&lt;fx:String&gt;Honolulu, HI&lt;/fx:String&gt;
					&lt;fx:String&gt;New York, NY&lt;/fx:String&gt;
					&lt;fx:String&gt;San Francisco, CA&lt;/fx:String&gt;
					&lt;fx:String&gt;San Jose, CA&lt;/fx:String&gt;
					&lt;fx:String&gt;Washington, DC&lt;/fx:String&gt;
				&lt;/s:ArrayCollection&gt;
			&lt;/s:dataProvider&gt;
		&lt;/s:SpinnerList&gt;
	&lt;/s:SpinnerListContainer&gt;
&lt;/s:View&gt;
</pre>
<p><strong>List Data</strong><br />
The <strong>SpinnerList</strong> control takes anything implementing the <strong>IList</strong> interface for the <em>dataProvider</em>, so you could bind it to an <strong>ArrayCollection</strong>, <strong>ArrayList</strong>, <strong>NumericDataProvider</strong>, <strong>XMLListCollection</strong> etc. This next example shows how to bind to an <strong>ArrayCollection</strong> containing a complex object versus a simple String. You could use a similar approach for data coming back as complex objects from a service call stored in an <strong>ArrayCollection</strong>:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:View xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
		xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot; title=&quot;Sample SpinnerList&quot; xmlns:r=&quot;renderers.*&quot;&gt;
	&lt;s:layout&gt;
		&lt;s:VerticalLayout paddingTop=&quot;40&quot; paddingBottom=&quot;5&quot; paddingLeft=&quot;5&quot; paddingRight=&quot;5&quot; gap=&quot;10&quot;
						  horizontalAlign=&quot;center&quot; verticalAlign=&quot;top&quot;/&gt;
	&lt;/s:layout&gt;
	&lt;s:TextArea width=&quot;90%&quot; editable=&quot;false&quot; skinClass=&quot;spark.skins.mobile.TextAreaSkin&quot;
				text=&quot;You can bind to data from a service result or externally defined list containing a complex object and refer to the String to be shown with the
labelName property.&quot;/&gt;

	&lt;fx:Declarations&gt;
		&lt;s:ArrayCollection id=&quot;suppliesAC&quot;&gt;
			&lt;fx:Object name=&quot;Ink&quot; price=&quot;54.99&quot;/&gt;
			&lt;fx:Object name=&quot;Stapler&quot; price=&quot;3.59&quot;/&gt;
			&lt;fx:Object name=&quot;Printer&quot; price=&quot;129.99&quot;/&gt;
			&lt;fx:Object name=&quot;Notepad&quot; price=&quot;2.49&quot;/&gt;
			&lt;fx:Object name=&quot;Mouse&quot; price=&quot;21.79&quot;/&gt;
			&lt;fx:Object name=&quot;Keyboard&quot; price=&quot;32.99&quot;/&gt;
		&lt;/s:ArrayCollection&gt;
	&lt;/fx:Declarations&gt;

	&lt;s:Label text=&quot;Select Supply:&quot;/&gt;
	&lt;s:SpinnerListContainer width=&quot;200&quot;&gt;
		&lt;s:SpinnerList id=&quot;supplyList&quot; width=&quot;100%&quot; labelField=&quot;name&quot; dataProvider=&quot;{suppliesAC}&quot;/&gt;
	&lt;/s:SpinnerListContainer&gt;	

	&lt;s:Label text=&quot;Selected Supply: {supplyList.selectedItem.name} @ {supplyList.selectedItem.price}&quot;/&gt;
&lt;/s:View&gt;
</pre>
<p>The above code produces the following:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/Spinner3.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/Spinner3.png" alt="" title="Spinner3" width="500" height="380" class="aligncenter size-full wp-image-3333" /></a></p>
<p><strong>SpinnerListContainer</strong><br />
Notice that the <strong>SpinnerList </strong>is put in a <strong>SpinnerListContainer</strong> which provides the chrome and a layout for it (<strong>HorizontalLayout </strong>by default). If you do not include the <strong>SpinnerList</strong> in a <strong>SpinnerListContainer</strong>, it would like the following (not very useful!):</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/spinnerList2.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/spinnerList2.png" alt="" title="spinnerList2" width="500" height="423" class="aligncenter size-full wp-image-3329" /></a></p>
<p>If you plan to bind a couple of <strong>SpinnerList</strong> controls together, you can do this by putting them all within the same <strong>SpinnerListContainer</strong> and they will be horizontally laid out properly by default. The new Flex 4.6 <strong>DateSpinner</strong> control is an example of this&#8230; See below on &#8216;Selecting Items&#8217; for another example of two <strong>SpinnerList</strong>&#8216;s in one <strong>SpinnerListContainer</strong>.</p>
<p><strong>List Wrapping</strong><br />
By default the list items wrap, however if you don&#8217;t want this to occur by default, you can set the <em>wrapElements</em> property to false and it will not wrap:</p>
<pre class="brush: xml; title: ; notranslate">
...
&lt;s:SpinnerList id=&quot;list&quot; width=&quot;100%&quot; wrapElements=&quot;false&quot;&gt;
...
</pre>
<p>You can see the empty item in the last spot in the following screenshot since the <em>wrapElements</em> is false:<br />
<a href="http://devgirl.org/wp-content/uploads/2011/11/Spinner4.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/Spinner4.png" alt="" title="Spinner List No Wrap" width="500" height="412" class="aligncenter size-full wp-image-3334" /></a></p>
<p><strong>Displaying the Label</strong><br />
You can use a <em>labelFunction</em> instead of a <em>labelField</em> for the label shown in the list. Here&#8217;s an example of using a simple <em>labelFunction </em>to concatenate the name and price properties from the data object:</p>
<pre class="brush: xml; title: ; notranslate">
...
&lt;fx:Script&gt;
	&lt;![CDATA[
		protected function lblFunction(item:Object):String
		{
			return item.name + &quot; @ &quot; + item.price;
		}
	]]&gt;
&lt;/fx:Script&gt;
...
         &lt;fx:Declarations&gt;
		&lt;s:ArrayCollection id=&quot;suppliesAC&quot;&gt;
			&lt;fx:Object name=&quot;Ink&quot; price=&quot;54.99&quot;/&gt;
			&lt;fx:Object name=&quot;Stapler&quot; price=&quot;3.59&quot;/&gt;
			&lt;fx:Object name=&quot;Printer&quot; price=&quot;129.99&quot;/&gt;
			&lt;fx:Object name=&quot;Notepad&quot; price=&quot;2.49&quot;/&gt;
			&lt;fx:Object name=&quot;Mouse&quot; price=&quot;21.79&quot;/&gt;
			&lt;fx:Object name=&quot;Keyboard&quot; price=&quot;32.99&quot;/&gt;
		&lt;/s:ArrayCollection&gt;
	&lt;/fx:Declarations&gt;
        &lt;s:Label text=&quot;Select Supply:&quot;/&gt;
	&lt;s:SpinnerListContainer width=&quot;200&quot;&gt;
		&lt;s:SpinnerList id=&quot;supplyList&quot; width=&quot;100%&quot; labelFunction=&quot;lblFunction&quot; dataProvider=&quot;{suppliesAC}&quot;/&gt;
	&lt;/s:SpinnerListContainer&gt;
</pre>
<p>And a screenshot:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/Spinner5.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/Spinner5.png" alt="" title="Spinner Sample" width="500" height="381" class="aligncenter size-full wp-image-3348" /></a></p>
<p><strong>Selecting Items</strong><br />
You can programmatically set items to be selected in the <strong>SpinnerList</strong> via the <em>selectedIndex</em> or <em>selectedItem</em> properties. For instance, in the following we can bind the 2nd list to the 1st SpinnerList selectedIndex such as:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:VGroup&gt;
	&lt;s:Label text=&quot;Item #  Item&quot;/&gt;
	&lt;s:SpinnerListContainer width=&quot;220&quot;&gt;
		&lt;s:SpinnerList id=&quot;list&quot; width=&quot;20%&quot;&gt;
			&lt;s:dataProvider&gt;
				&lt;s:NumericDataProvider minimum=&quot;0&quot; maximum=&quot;5&quot; stepSize=&quot;1&quot;/&gt;
			&lt;/s:dataProvider&gt;
		&lt;/s:SpinnerList&gt;
		&lt;s:SpinnerList id=&quot;supplyList&quot; width=&quot;80%&quot; labelField=&quot;name&quot; dataProvider=&quot;{suppliesAC}&quot; selectedIndex=&quot;{list.selectedItem}&quot;/&gt;
	&lt;/s:SpinnerListContainer&gt;
&lt;/s:VGroup&gt;
</pre>
<p>Then as you interact with the left side numeric <strong>SpinnerList</strong> and select different indexes, the right <strong>SpinnerList</strong> selected item will change (probably need to <a href="http://devgirl.org/files/SpinnerListSample">download and run the source</a> for yourself to see this best). Using the above code, when I select 1 instead of 0, the right side will select the Stapler item:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/Spinner7.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/Spinner7.png" alt="" title="Sample Spinner Binding" width="500" height="307" class="aligncenter size-full wp-image-3357" /></a></p>
<p><strong>Styling List Items</strong><br />
You can style the <strong>SpinnerListItemRenderer</strong> to change the padding between the items for instance by setting a style such as:</p>
<pre class="brush: xml; title: ; notranslate">
        &lt;fx:Style&gt;
		@namespace s &quot;library://ns.adobe.com/flex/spark&quot;;

		s|SpinnerListItemRenderer
		{
			paddingTop : 5;
			paddingBottom : 5;
			paddingLeft : 5;
			paddingRight : 5;
		}
	&lt;/fx:Style&gt;
</pre>
<p>You could also override the <strong>SpinnerListItemRenderer</strong> class and modify the background color or alpha, such as the following simple custom item renderer:</p>
<pre class="brush: as3; title: ; notranslate">
package renderers
{
	import spark.components.SpinnerListItemRenderer;

	public class MySpinnerListRenderer extends SpinnerListItemRenderer
	{
		override protected function drawBackground(unscaledWidth:Number, unscaledHeight:Number):void
		{
			graphics.beginFill(0x92ADC2, .7);
			graphics.lineStyle();
			graphics.drawRect(0, 0, unscaledWidth,unscaledHeight);
			graphics.endFill();
		}
	}
}
</pre>
<p>Here is the screenshot with the new item renderer applied to the SpinnerLists:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/Spinner8.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/Spinner8.png" alt="" title="Spinner Sample" width="500" height="307" class="aligncenter size-full wp-image-3358" /></a></p>
<p>The sample project and source code is available <a href="http://devgirl.org/files/SpinnerListSample/"><strong>HERE</strong></a> if you&#8217;d like to give it a whirl! </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdevgirl.org%2F2011%2F11%2F14%2Fflex-mobile-development-spinnerlist-sample-with-source-code%2F&amp;title=Flex%20Mobile%20Development%20%26%238211%3B%20SpinnerList%20Sample%20%28with%20source%20code%29" id="wpa2a_18"><img src="http://devgirl.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://devgirl.org/2011/11/14/flex-mobile-development-spinnerlist-sample-with-source-code/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Flex Mobile Development &#8211; ToggleSwitch Sample (with source)!</title>
		<link>http://devgirl.org/2011/11/02/flex-mobile-development-toggleswitch-sample-with-source/</link>
		<comments>http://devgirl.org/2011/11/02/flex-mobile-development-toggleswitch-sample-with-source/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 20:38:49 +0000</pubDate>
		<dc:creator>Holly Schinsky</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Flex 4.5]]></category>
		<category><![CDATA[Flex 4.5/Mobile]]></category>
		<category><![CDATA[Flex 4.6]]></category>
		<category><![CDATA[Flex Mobile]]></category>
		<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[flex tablet components]]></category>
		<category><![CDATA[flex toggle]]></category>
		<category><![CDATA[flex ToggleSwitch]]></category>

		<guid isPermaLink="false">http://devgirl.org/?p=3303</guid>
		<description><![CDATA[The Flex/Flash Builder 4.6 prerelease includes a new ToggleSwitch control that can be used to indicate a binary value (like a CheckBox). Below is a screenshot showing a sample of two being used. The first switch shows it selected by default using a specified slide duration (for animation in milliseconds), and the second one uses [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="https://prerelease.adobe.com/callout/default.html?callid=DC919522A42544798C33ECB4041FC5DC">Flex/Flash Builder 4.6 prerelease</a> includes a new <strong>ToggleSwitch</strong> control that can be used to indicate a binary value (like a CheckBox). Below is a screenshot showing a sample of two being used. The first switch shows it selected by default using a specified slide duration (for animation in milliseconds), and the second one uses a custom skin class to define different labels:</p>
<p><a href="http://devgirl.org/wp-content/uploads/2011/11/ToggleSwitch11.png"><img src="http://devgirl.org/wp-content/uploads/2011/11/ToggleSwitch11.png" alt="" title="ToggleSwitch Sample" width="500" height="710" class="aligncenter size-full wp-image-3316" /></a></p>
<p>The important part of the sample MXML using the components is shown below. Note how you can use the change event on the switch to determine when selection has changed:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:View xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
		xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot; title=&quot;Sample ToggleSwitch&quot;&gt;

	&lt;fx:Script&gt;
		&lt;![CDATA[
			protected function toggleswitch1_changeHandler(event:Event):void
			{
				lbl.text=event.target.id + &quot; selected = &quot; + event.target.selected;
			}
		]]&gt;
	&lt;/fx:Script&gt;

	&lt;s:layout&gt;
		&lt;s:VerticalLayout paddingBottom=&quot;5&quot; paddingLeft=&quot;5&quot; paddingRight=&quot;5&quot; gap=&quot;12&quot;
						  horizontalAlign=&quot;center&quot; verticalAlign=&quot;middle&quot;/&gt;
	&lt;/s:layout&gt;

	&lt;!-- only specifying this skin class on the TextArea to get around a prerelease bug where it won't wrap using the emulator unless this is set --&gt;
	&lt;s:TextArea width=&quot;95%&quot; skinClass=&quot;spark.skins.mobile.TextAreaSkin&quot; editable=&quot;false&quot;
				text=&quot;The Spark ToggleSwitch control defines a binary switch. Clicking anywhere in the control toggles the state. You can also slide the thumb along the track to change state.
Default values for the unselected and selected labels are OFF (unselected) and ON (selected). You can also easily change the labels shown by defining a custom skin as shown in the 2nd ToggleSwitch
component below:&quot;/&gt;

	&lt;s:VGroup gap=&quot;8&quot;&gt;
		&lt;s:Label text=&quot;SETTINGS&quot;/&gt;
		&lt;s:HGroup verticalAlign=&quot;middle&quot;&gt;
			&lt;s:Label text=&quot;Wifi&quot;/&gt;
			&lt;s:ToggleSwitch id=&quot;switch1&quot; selected=&quot;true&quot; slideDuration=&quot;100&quot; change=&quot;toggleswitch1_changeHandler(event)&quot;/&gt;
		&lt;/s:HGroup&gt;
		&lt;s:HGroup verticalAlign=&quot;middle&quot;&gt;
			&lt;s:Label text=&quot;Port 80&quot;/&gt;
			&lt;s:ToggleSwitch id=&quot;switch2&quot; skinClass=&quot;skins.MyToggleSwitchSkin&quot; change=&quot;toggleswitch1_changeHandler(event)&quot;/&gt;
		&lt;/s:HGroup&gt;
		&lt;s:Label id=&quot;lbl&quot;/&gt;
	&lt;/s:VGroup&gt;
&lt;/s:View&gt;
</pre>
<p>The simple ActionScript skin used to change the labels to the custom values in the 2nd <strong>ToggleSwitch</strong> control is shown here:</p>
<pre class="brush: as3; title: ; notranslate">
package skins
{
	import spark.skins.mobile.ToggleSwitchSkin;

	public class MyToggleSwitchSkin extends ToggleSwitchSkin
	{
		public function MyToggleSwitchSkin()
		{
			super();
			selectedLabel=&amp;quot;Open&amp;quot;;
			unselectedLabel=&amp;quot;Closed&amp;quot;;
		}
	}
}
</pre>
<p>You can download the sample code, project or apk <a href="http://devgirl.org/files/SampleToggleSwitch/">HERE</a>.</p>
<p>If you haven&#8217;t joined the Flex 4.6/Flash Builder 4.6 prerelease yet, you can do so <a href="https://prerelease.adobe.com/callout/default.html?callid=DC919522A42544798C33ECB4041FC5DC">here</a>! </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdevgirl.org%2F2011%2F11%2F02%2Fflex-mobile-development-toggleswitch-sample-with-source%2F&amp;title=Flex%20Mobile%20Development%20%26%238211%3B%20ToggleSwitch%20Sample%20%28with%20source%29%21" id="wpa2a_20"><img src="http://devgirl.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://devgirl.org/2011/11/02/flex-mobile-development-toggleswitch-sample-with-source/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

