<?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>cssgallery.info &#187; Dan Tamas</title>
	<atom:link href="http://cssgallery.info/author/spawn/feed/" rel="self" type="application/rss+xml" />
	<link>http://cssgallery.info</link>
	<description>Resources for web developers</description>
	<lastBuildDate>Sun, 11 Jul 2010 16:19:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>FunnyABC &#8211; teach your kids the alphabet with your iPhone</title>
		<link>http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/</link>
		<comments>http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 21:58:03 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[cartoons]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[Download from Appstore]]></category>
		<category><![CDATA[educational application]]></category>
		<category><![CDATA[FunnyABC]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[iphone application]]></category>
		<category><![CDATA[kids]]></category>
		<category><![CDATA[learn the alphabet]]></category>
		<category><![CDATA[learning the letters]]></category>
		<category><![CDATA[play with letters]]></category>
		<category><![CDATA[playing sessions]]></category>
		<category><![CDATA[touch]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=1433</guid>
		<description><![CDATA[Help your children learn the alphabet by using this interactive, voice-based application with colourful cartoons and letters.

This educational application is <strong>based on 2 activities</strong>: <strong>one for learning the letters through examples</strong> (a female voice pronouncing the letter and the associated cartoons) and <strong>one for playing with the newly learned letters</strong> by choosing the correct one from a list of five.

The entire game is voice assisted allowing your child to start a session of learning or playing without the help of an adult.

<object width="420" height="300"><param name="movie" value="http://www.youtube.com/v/V0aBzLi4h0I&#038;hl=en&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/V0aBzLi4h0I&#038;hl=en&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="420" height="300"></embed></object>

]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Ffunnyabc-teach-your-kids-the-alphabet-with-your-iphone%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Ffunnyabc-teach-your-kids-the-alphabet-with-your-iphone%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://itunes.apple.com/us/app/funny-abc/id378471932?mt=8">Download it from Appstore!</a></p>
<p>Help your children learn the alphabet by using this interactive, voice-based application with colourful cartoons and letters.</p>
<p><object width="600" height="400"><param name="movie" value="http://www.youtube.com/v/V0aBzLi4h0I&#038;hl=en&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/V0aBzLi4h0I&#038;hl=en&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="600" height="400"></embed></object></p>
<p>This educational application is <strong>based on 2 activities</strong>: <strong>one for learning the letters through examples</strong> (a female voice pronouncing the letter and the associated cartoons) and <strong>one for playing with the newly learned letters</strong> by choosing the correct one from a list of five.</p>
<p>The entire game is voice assisted allowing your child to start a session of learning or playing without the help of an adult.</p>
<p>The application allows you to choose between three levels of difficulty, to set a maximum number of letters per lesson and the number of minutes for the playing session.</p>
<p>Give your child the opportunity of learning the FunnyABC way! <a href="http://itunes.apple.com/us/app/funny-abc/id378471932?mt=8">Download it from Appstore!</a></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/&amp;title=FunnyABC+-+teach+your+kids+the+alphabet+with+your+iPhone&amp;description=Help%20your%20children%20learn%20the%20alphabet%20by%20using%20this%20interactive%2C%20voice-based%20application%20with%20colourful%20cartoons%20and%20letters.%0D%0A%0D%0AThis%20educational%20application%20is%20based%20on%202%20activities%3A%20one%20for%20learning%20the%20letters%20through%20examples%20%28a%20female%20voice%20pronouncing%20the%20letter%20and%20the%20associated%20cartoons%29%20and%20one%20for%20playing%20with%20the%20newly%20learned%20letters%20by%20choosing%20the%20correct%20one%20from%20a%20list%20of%20five.%0D%0A%0D%0AThe%20entire%20game%20is%20voice%20assisted%20allowing%20your%20child%20to%20start%20a%20session%20of%20learning%20or%20playing%20without%20the%20help%20of%20an%20adult.%0D%0A%0D%0A%0D%0A%0D%0A" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/&amp;title=FunnyABC+-+teach+your+kids+the+alphabet+with+your+iPhone" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/&amp;title=FunnyABC+-+teach+your+kids+the+alphabet+with+your+iPhone" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/&amp;title=FunnyABC+-+teach+your+kids+the+alphabet+with+your+iPhone" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/&amp;title=FunnyABC+-+teach+your+kids+the+alphabet+with+your+iPhone" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/&amp;t=FunnyABC+-+teach+your+kids+the+alphabet+with+your+iPhone" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/&amp;title=FunnyABC+-+teach+your+kids+the+alphabet+with+your+iPhone" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/&amp;title=FunnyABC+-+teach+your+kids+the+alphabet+with+your+iPhone&amp;srcUrl=http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/&amp;srcTitle=FunnyABC+-+teach+your+kids+the+alphabet+with+your+iPhone&amp;snippet=Help%20your%20children%20learn%20the%20alphabet%20by%20using%20this%20interactive%2C%20voice-based%20application%20with%20colourful%20cartoons%20and%20letters.%0D%0A%0D%0AThis%20educational%20application%20is%20based%20on%202%20activities%3A%20one%20for%20learning%20the%20letters%20through%20examples%20%28a%20female%20voice%20pronouncing%20the%20letter%20and%20the%20associated%20cartoons%29%20and%20one%20for%20playing%20with%20the%20newly%20learned%20letters%20by%20choosing%20the%20correct%20one%20from%20a%20list%20of%20five.%0D%0A%0D%0AThe%20entire%20game%20is%20voice%20assisted%20allowing%20your%20child%20to%20start%20a%20session%20of%20learning%20or%20playing%20without%20the%20help%20of%20an%20adult.%0D%0A%0D%0A%0D%0A%0D%0A" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/funnyabc-teach-your-kids-the-alphabet-with-your-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kids-apps.mobi &#8211; our new showroom for kids applications</title>
		<link>http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/</link>
		<comments>http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 22:56:10 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Gallery]]></category>
		<category><![CDATA[Submitted news]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[children applications]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[edu]]></category>
		<category><![CDATA[educational]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[iPad apps]]></category>
		<category><![CDATA[iPhone apps]]></category>
		<category><![CDATA[kids applications]]></category>
		<category><![CDATA[the best applications]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=1268</guid>
		<description><![CDATA[We just launched <strong><a href="http://kids-apps.mobi" rel="us">kids-apps.mobi</a></strong>, a showroom dedicated  to gathering in one place iPad and iPhone/iPod touch applications for children.

It intends to be a <strong>collection of only the best applications for your kids</strong>  offering a easy way to find what you are looking for without the need of searching the entire Appstore for this.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fkids-apps-mobi-our-new-showroom-for-kids-applications%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fkids-apps-mobi-our-new-showroom-for-kids-applications%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>We just launched <strong><a href="http://kids-apps.mobi" rel="us">kids-apps.mobi</a></strong>, a showroom dedicated  to gathering in one place iPad and iPhone/iPod touch applications for children.</p>
<p>It intends to be a collection of only the best applications for your kids  offering a easy way to find what you are looking for without the need of searching the entire Appstore for this.</p>
<p><img src="http://www.cssgallery.info/wp-content/uploads/2010/06/capture-1-e1276285926661.png" alt="kids-apps.mobi" title="kids-apps.mobi" width="650" height="361" class="alignnone size-full wp-image-1269" /></p>
<h2>Upload your kids application</h2>
<p>So if you have launched an application and would like to show in the <strong><a href="http://kids-apps.mobi">kids-apps.mobi</a></strong> website, drop us a line using the form <a href="http://kids-apps.mobi/upload-your-application/">here</a>. </p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications&amp;description=We%20just%20launched%20kids-apps.mobi%2C%20a%20showroom%20dedicated%20%20to%20gathering%20in%20one%20place%20iPad%20and%20iPhone%2FiPod%20touch%20applications%20for%20children.%0D%0A%0D%0AIt%20intends%20to%20be%20a%20collection%20of%20only%20the%20best%20applications%20for%20your%20kids%20%20offering%20a%20easy%20way%20to%20find%20what%20you%20are%20looking%20for%20without%20the%20need%20of%20searching%20the%20entire%20Appstore%20for%20this." rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;t=Kids-apps.mobi+-+our+new+showroom+for+kids+applications" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications&amp;srcUrl=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;srcTitle=Kids-apps.mobi+-+our+new+showroom+for+kids+applications&amp;snippet=We%20just%20launched%20kids-apps.mobi%2C%20a%20showroom%20dedicated%20%20to%20gathering%20in%20one%20place%20iPad%20and%20iPhone%2FiPod%20touch%20applications%20for%20children.%0D%0A%0D%0AIt%20intends%20to%20be%20a%20collection%20of%20only%20the%20best%20applications%20for%20your%20kids%20%20offering%20a%20easy%20way%20to%20find%20what%20you%20are%20looking%20for%20without%20the%20need%20of%20searching%20the%20entire%20Appstore%20for%20this." rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fairy Tales for iPad &#8211; our ebook app</title>
		<link>http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/</link>
		<comments>http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 09:35:09 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[4 volumes]]></category>
		<category><![CDATA[62 stories]]></category>
		<category><![CDATA[accessible]]></category>
		<category><![CDATA[appstore]]></category>
		<category><![CDATA[bedtime stories]]></category>
		<category><![CDATA[Brothers Grimm]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Fairy Tales]]></category>
		<category><![CDATA[night mode]]></category>
		<category><![CDATA[usable]]></category>

		<guid isPermaLink="false">http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/</guid>
		<description><![CDATA[We have launched the first ebook "Fairy Tales" by Brothers Grimm which contains a set of 62 beautiful bedtime stories. 
It is built as an iPad application available for <a href="http://itunes.apple.com/us/app/fairy-tales-by-brothers-grimm/id372644425?mt=8">download on Appstore</a>.

The application has a beautiful and usable interface  allowing the user to choose the font, the size of the text and to switch to night-mode for a better reading experience during the night. It saves your current reading position in realtime so you can close the ebook at anytime and return to reading it later.

<object width="420" height="300"><param name="movie" value="http://www.youtube.com/v/KzkHVOlR6jw&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/KzkHVOlR6jw&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="420" height="300"></embed></object>

]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Ffairy-tales-for-ipad-our-ebook-app%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Ffairy-tales-for-ipad-our-ebook-app%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>We have launched the first ebook &#8220;Fairy Tales&#8221; by Brothers Grimm which contains a set of 62 beautiful bedtime stories.<br />
It is built as an iPad application available for <a href="http://itunes.apple.com/us/app/fairy-tales-by-brothers-grimm/id372644425?mt=8">download on Appstore</a>.</p>
<p><object width="600" height="400"><param name="movie" value="http://www.youtube.com/v/KzkHVOlR6jw&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/KzkHVOlR6jw&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="600" height="400"></embed></object></p>
<p>The application has a beautiful and usable interface  allowing the user to choose the font, the size of the text and to switch to night-mode for a better reading experience during the night. It saves your current reading position in realtime so you can close the ebook at anytime and return to reading it later.</p>
<h2>Chapter 1 stories</h2>
<ul>
<li>Ashputtel</li>
<li>Briar Rose</li>
<li>Cat and mouse in partnership</li>
<li>Cat-skin</li>
<li>Clever Elsie</li>
<li>Clever Gretel</li>
<li>Clever Hans</li>
<li>Doctor Knowall</li>
<li>Frederick and Catherine</li>
<li>Fundevogel</li>
<li>Hans in luck</li>
<li><strong>Hansel and Gretel</strong></li>
<li>Iron Hans</li>
<li>Jorinda and Jorindel</li>
<li>King Grisly-beard</li>
</ul>
<h2>Chapter 2 stories</h2>
<ul>
<li>Lily and the lion</li>
<li><strong>Little red riding hood</strong></li>
<li>Mother Holle</li>
<li>Old sultan</li>
<li>Rapunzel</li>
<li>Rumpelstiltskin</li>
<li>Snow-white and Rose-red</li>
<li>Snowdrop</li>
<li>Sweetheart Roland</li>
<li>The 4 clever brothers</li>
<li>The 7 ravens</li>
<li>The 12 dancing princesses</li>
<li>The 12 huntsmen</li>
<li>The adventures of Chanticleer and Partlet</li>
<li>The blue heart</li>
</ul>
<h2>Chapter 3 stories</h2>
<ul>
<li>The dog and the sparrow</li>
<li>The elves and the shoemaker</li>
<li>The fisherman and his wife</li>
<li>The fox and the cat</li>
<li>The fox and the horse</li>
<li><strong>The frog-prince</strong></li>
<li>The golden bird</li>
<li>The golden goose</li>
<li>The goose-girl</li>
<li>The juniper-tree</li>
<li>The king of the golden mountain</li>
<li>The little peasant</li>
<li>The miser in the bush</li>
<li>The mouse, the bird and the sausage</li>
<li>The old man and his grandson</li>
<li>The pink</li>
</ul>
<h2>Chapter 4 stories</h2>
<ul>
<li>The queen bee</li>
<li>The raven</li>
<li>The robber bridegroom</li>
<li>The salad</li>
<li>The story of the youth who went forth to learn what fear was</li>
<li>The straw the coal and the bean</li>
<li>The three languages</li>
<li>The travelling musicians</li>
<li>The turnip</li>
<li><strong>The valiant little tailor</strong></li>
<li>The water of life</li>
<li>The wedding of mister Fox</li>
<li>The white snake</li>
<li>The willow-wren and his bear</li>
<li>The wolf and the seven little kids</li>
<li><strong>Tom thumb</strong></li>
</ul>
<p><strong class="spanish">Check the Spanish version of this post:<br />
 <a href="http://nosoloweb.es/cuentos-de-hadas-para-ipad-nuestra-aplicacion-ebook/" rel="me">Cuentos de Hadas para iPad – nuestra aplicación ebook</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app&amp;description=We%20have%20launched%20the%20first%20ebook%20%22Fairy%20Tales%22%20by%20Brothers%20Grimm%20which%20contains%20a%20set%20of%2062%20beautiful%20bedtime%20stories.%20%0D%0AIt%20is%20built%20as%20an%20iPad%20application%20available%20for%20download%20on%20Appstore.%0D%0A%0D%0AThe%20application%20has%20a%20beautiful%20and%20usable%20interface%20%20allowing%20the%20user%20to%20choose%20the%20font%2C%20the%20size%20of%20the%20text%20and%20to%20switch%20to%20night-mode%20for%20a%20better%20reading%20experience%20during%20the%20night.%20It%20saves%20your%20current%20reading%20position%20in%20realtime%20so%20you%20can%20close%20the%20ebook%20at%20anytime%20and%20return%20to%20reading%20it%20later.%0D%0A%0D%0A%0D%0A%0D%0A" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;t=Fairy+Tales+for+iPad+-+our+ebook+app" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app&amp;srcUrl=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;srcTitle=Fairy+Tales+for+iPad+-+our+ebook+app&amp;snippet=We%20have%20launched%20the%20first%20ebook%20%22Fairy%20Tales%22%20by%20Brothers%20Grimm%20which%20contains%20a%20set%20of%2062%20beautiful%20bedtime%20stories.%20%0D%0AIt%20is%20built%20as%20an%20iPad%20application%20available%20for%20download%20on%20Appstore.%0D%0A%0D%0AThe%20application%20has%20a%20beautiful%20and%20usable%20interface%20%20allowing%20the%20user%20to%20choose%20the%20font%2C%20the%20size%20of%20the%20text%20and%20to%20switch%20to%20night-mode%20for%20a%20better%20reading%20experience%20during%20the%20night.%20It%20saves%20your%20current%20reading%20position%20in%20realtime%20so%20you%20can%20close%20the%20ebook%20at%20anytime%20and%20return%20to%20reading%20it%20later.%0D%0A%0D%0A%0D%0A%0D%0A" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a combo-box in Titanium Appcelerator &#8211; code and video</title>
		<link>http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/</link>
		<comments>http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/#comments</comments>
		<pubDate>Sat, 29 May 2010 10:08:12 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Development tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[getSelectedRow]]></category>
		<category><![CDATA[iphone combobox]]></category>
		<category><![CDATA[iphone tutorial]]></category>
		<category><![CDATA[picker_view]]></category>
		<category><![CDATA[textField]]></category>
		<category><![CDATA[titanium appcelerator combobox]]></category>
		<category><![CDATA[titanium tutorial]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=1221</guid>
		<description><![CDATA[A true iPhone or Ipad combobox that allows you to use  the same textfield to input arbitrary text or select a value from a UIPicker element. All built with Titanium Appcelerator to include in your iPhone application.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fmaking-a-combo-box-in-titanium-appcelerator-code-and-video%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fmaking-a-combo-box-in-titanium-appcelerator-code-and-video%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Sometimes we need a true combobox for our projects but iPhone SDK does not have a native one (at least from what I know)  and  of course neither has Titanium. </p>
<p>So we will build one. A &#8220;true&#8221; iPhone or Ipad combobox that allows you to use  the same textfield to input arbitrary text or select a value from a UIPicker element.</p>
<p>Updated with <a href="http://twitter.com/CJ_Reed">@CJ_Reed&#8217;s</a> screenshot and code at the final of the tutorial.</p>
<p>Let&#8217;s see the video first, then we&#8217;ll get to work:</p>
<p><object width="650" height="400"><param name="movie" value="http://www.youtube.com/v/2H-w_hUQtPw&#038;hl=en&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2H-w_hUQtPw&#038;hl=en&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="650" height="400"></embed></object></p>
<h2>Ok, what do we need for this iPhone combobox ?</h2>
<p>First of all we need a <strong>textField</strong> to accept input from the user. Titanium lets you set the <strong>leftButton</strong> and <strong>rightButton</strong> for this <strong>textField</strong> while constructing it. So we will take advantage of this and create a textField as it follows:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> my_combo <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createTextField</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	hintText<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;write your name or select one&quot;</span><span style="color: #339933;">,</span>
	height<span style="color: #339933;">:</span><span style="color: #CC0000;">40</span><span style="color: #339933;">,</span>
	width<span style="color: #339933;">:</span><span style="color: #CC0000;">300</span><span style="color: #339933;">,</span>
	top<span style="color: #339933;">:</span><span style="color: #CC0000;">20</span><span style="color: #339933;">,</span>
	borderStyle<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">INPUT_BORDERSTYLE_ROUNDED</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Nothing special, a regular <strong>textField</strong> with a hint for the user  that will disappear when the <strong>textField</strong> has a value.</p>
<p>Now we need to create the <strong>rightButton</strong> for it.</p>
<p>We will  use a system button provided by Apple (<strong>Titanium.UI.iPhone.SystemButton.DISCLOSURE</strong>)  only that we will rotate it 90 degrees to server our purpose. This is the code that creates the <strong>rightButton</strong> and the transformation applied to it.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> tr <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">create2DMatrix</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
tr <span style="color: #339933;">=</span> tr.<span style="color: #660066;">rotate</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">90</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> drop_button <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createButton</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		style<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">iPhone</span>.<span style="color: #660066;">SystemButton</span>.<span style="color: #660066;">DISCLOSURE</span><span style="color: #339933;">,</span>
		transform<span style="color: #339933;">:</span>tr
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now that we have the <strong>rightButton</strong> as we need it, the <strong>textField</strong> constructor becomes:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> my_combo <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createTextField</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	hintText<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;write your name or select one&quot;</span><span style="color: #339933;">,</span>
	height<span style="color: #339933;">:</span><span style="color: #CC0000;">40</span><span style="color: #339933;">,</span>
	width<span style="color: #339933;">:</span><span style="color: #CC0000;">300</span><span style="color: #339933;">,</span>
	top<span style="color: #339933;">:</span><span style="color: #CC0000;">20</span><span style="color: #339933;">,</span>
	borderStyle<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">INPUT_BORDERSTYLE_ROUNDED</span><span style="color: #339933;">,</span>
	rightButton<span style="color: #339933;">:</span>drop_button<span style="color: #339933;">,</span>
	rightButtonMode<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">INPUT_BUTTONMODE_ALWAYS</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Please note the <strong>rightButtonMode:Titanium.UI.INPUT_BUTTONMODE_ALWAYS</strong> declaration, it makes this button visible all the time.</p>
<p>This is how it looks:</p>
<p><img class="alignnone size-full wp-image-1223" title="iPhone combobox with Titanium" src="http://cssgallery.info/wp-content/uploads/2010/05/capture-11.png" alt="iPhone combobox with Titanium" width="400" height="83" /></p>
<p>Pretty sexy, isn&#8217;t it? Well we&#8217;re not done yet.</p>
<h2>Building the modal picker</h2>
<p>When the user focuses on the <strong>textField</strong>, the keyboard appears &#8211; so we will have to build our <strong>picker</strong> to emulate the same behaviour and to maximize the usability of our form. For this we will need a <strong>Picker</strong>  and two buttons: <strong>Done</strong> and <strong>Cancel</strong>. These two buttons will be positioned in a <strong>Toolbar</strong>, again, to  emulate as good as possible the keyboard behaviour.</p>
<p>Let&#8217;s build everything:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> picker_view <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	height<span style="color: #339933;">:</span><span style="color: #CC0000;">251</span><span style="color: #339933;">,</span>
	bottom<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> cancel <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createButton</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	title<span style="color: #339933;">:</span><span style="color: #3366CC;">'Cancel'</span><span style="color: #339933;">,</span>
	style<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">iPhone</span>.<span style="color: #660066;">SystemButtonStyle</span>.<span style="color: #660066;">BORDERED</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> done <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createButton</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	title<span style="color: #339933;">:</span><span style="color: #3366CC;">'Done'</span><span style="color: #339933;">,</span>
	style<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">iPhone</span>.<span style="color: #660066;">SystemButtonStyle</span>.<span style="color: #660066;">DONE</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> spacer <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createButton</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	systemButton<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">iPhone</span>.<span style="color: #660066;">SystemButton</span>.<span style="color: #660066;">FLEXIBLE_SPACE</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> toolbar <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createToolbar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	top<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
	items<span style="color: #339933;">:</span><span style="color: #009900;">&#91;</span>cancel<span style="color: #339933;">,</span>spacer<span style="color: #339933;">,</span>done<span style="color: #009900;">&#93;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> picker <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createPicker</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		top<span style="color: #339933;">:</span><span style="color: #CC0000;">43</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
picker.<span style="color: #660066;">selectionIndicator</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> picker_data <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
	Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createPickerRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span><span style="color: #3366CC;">'John'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createPickerRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span><span style="color: #3366CC;">'Alex'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createPickerRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span><span style="color: #3366CC;">'Marie'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createPickerRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span><span style="color: #3366CC;">'Eva'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createPickerRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span><span style="color: #3366CC;">'James'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
picker.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>picker_data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
picker_view.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>toolbar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
picker_view.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>picker<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The code is a little long but is not rocket science. Some stuff to talk about though:</p>
<ul>
<li>Everyting is wrapped inside a view &#8211; <strong>picker_view</strong> &#8211;  because we will have to animate like the keyboard does, so it&#8217;s faster to animate one element only.</li>
<li>The height of <strong>picker_view</strong> is the height of the <strong>toolbar</strong> (43px) + the height of the <strong>picker</strong> (208px). How do I know this? I just used a ruler <img src='http://cssgallery.info/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  </li>
</ul>
<p>The combobox interface looks like this:</p>
<p><img class="alignnone size-full wp-image-1226" title="picker Titanium for combobox" src="http://cssgallery.info/wp-content/uploads/2010/05/capture-2.png" alt="picker Titanium for combobox" width="326" height="465" /></p>
<h2>Creating the picker animation</h2>
<p>We also need to create 2 animations: <strong>slide_in</strong> and <strong>slide_out</strong>. We will animate the <strong>bottom</strong> property of the <strong>picker_view</strong>. We will need to start with the <strong>picker_view</strong> off the screen, so we will build it with:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"> bottom<span style="color: #339933;">:-</span><span style="color: #CC0000;">251</span></pre></div></div>

<p>instead of 0 as it was initially.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> slide_in <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createAnimation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>bottom<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> slide_out <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createAnimation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>bottom<span style="color: #339933;">:-</span><span style="color: #CC0000;">251</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The logic behind the animations is this:</p>
<ul>
<li>The user focuses the <strong>textField</strong> &#8211;  the keyboard appears ( it&#8217;s done by the OS , no worries here) and if the <strong>picker_view</strong> is visible we need to hide it.</li>
<li>The user clicks the <strong>rightButton</strong> &#8211; we need to hide the keyboard and show the <strong>picker_view</strong>.</li>
</ul>
<p>Here is the code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">my_combo.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'focus'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	picker_view.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span>slide_out<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
drop_button.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	picker_view.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span>slide_in<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	my_combo.<span style="color: #000066;">blur</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
cancel.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	picker_view.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span>slide_out<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I also added the click event on the <strong>cancel</strong> button to hide the <strong>picker_view</strong>.</p>
<h2>Filling the textField with the picker&#8217;s value</h2>
<p>The only thing we have left is to actually put the value of the picker in the <strong>my_combo</strong> textField when the user clicks the <strong>done</strong> button  and hide the <strong>picker_view</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">done.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	my_combo.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span>  picker.<span style="color: #660066;">getSelectedRow</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">title</span><span style="color: #339933;">;</span>
	picker_view.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span>slide_out<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The <strong>getSelectedRow</strong> method of the picker is returning the selected row, and we use its <strong>title</strong>. The <strong>getSelectedRow</strong> argument is the <strong>index</strong> of the columns in the <strong>picker</strong>, and since we have only one, this is <strong>0</strong>.</p>
<h2>Download the project</h2>
<p>The Resource folder of the project can be downloaded from <a href="http://cssgallery.info/wp-content/combobox_tutorial.zip">here</a>.</p>
<p>Everything is MIT licensed, but as usual, spread the word <img src='http://cssgallery.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>We have an update</h2>
<p><a href="http://twitter.com/CJ_Reed">@CJ_Reed</a> used this tutorial &#8220;to produce multiple selection type data entry in a single window.&#8221;<br />
Here is how it looks like:<br />
<img src="http://cssgallery.info/wp-content/uploads/2010/05/large_multiCombo.jpg" alt="to produce multiple selection type data entry in a single window." title="multiple selection type data entry in a single window." width="550" height="254" class="alignnone size-full wp-image-1251" /><br />
You can take a look at he&#8217;s code <a href="http://www.pastie.org/983594">here</a>.<br />
Great work!</p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
 <a href="http://nosoloweb.es/haciendo-una-lista-de-opciones-desplegables-en-titanium-appcelerator-codigo-y-video-2/" rel="me">Haciendo una lista de opciones desplegables en Titanium Appcelerator – Código y Vídeo</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+&amp;description=A%20true%20iPhone%20or%20Ipad%20combobox%20that%20allows%20you%20to%20use%20%20the%20same%20textfield%20to%20input%20arbitrary%20text%20or%20select%20a%20value%20from%20a%20UIPicker%20element.%20All%20built%20with%20Titanium%20Appcelerator%20to%20include%20in%20your%20iPhone%20application." rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;t=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+&amp;srcUrl=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;srcTitle=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+&amp;snippet=A%20true%20iPhone%20or%20Ipad%20combobox%20that%20allows%20you%20to%20use%20%20the%20same%20textfield%20to%20input%20arbitrary%20text%20or%20select%20a%20value%20from%20a%20UIPicker%20element.%20All%20built%20with%20Titanium%20Appcelerator%20to%20include%20in%20your%20iPhone%20application." rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Create a countdown timer with Titanium Appcelerator</title>
		<link>http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/</link>
		<comments>http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/#comments</comments>
		<pubDate>Thu, 27 May 2010 13:37:18 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Development tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[appcelearor]]></category>
		<category><![CDATA[countdoun timer]]></category>
		<category><![CDATA[counter]]></category>
		<category><![CDATA[reset timer]]></category>
		<category><![CDATA[set timer]]></category>
		<category><![CDATA[start timer]]></category>
		<category><![CDATA[stop timer]]></category>
		<category><![CDATA[timer]]></category>
		<category><![CDATA[titanium]]></category>
		<category><![CDATA[titanium tutorial]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=1048</guid>
		<description><![CDATA[How to create a countdown timer for your iPhone with Titanium Appcelerator. Source code available for download. ]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fcreate-a-countdown-timer-with-titanium-appcelerator%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fcreate-a-countdown-timer-with-titanium-appcelerator%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In this post we will try to show you how to make a countdown timer using Titanium Appcelerator for Iphone or Android applications.  </p>
<p>First we will create an <strong>OOP countDown</strong> object that can be used independently in the background of the application and then we will connect it with some interface elements.</p>
<h3>The countDown object</h3>
<p>To have functional a countdown timer we&#8217;ll need to declare some properties and some methods.</p>
<p>As properties we will set:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">time<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span> m <span style="color: #339933;">:</span> minutes<span style="color: #339933;">,</span> s <span style="color: #339933;">:</span> seconds <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
total_seconds <span style="color: #339933;">:</span> m<span style="color: #339933;">*</span><span style="color: #CC0000;">60</span><span style="color: #339933;">+</span>s</pre></div></div>

<p>I think this is pretty clear, <strong>time</strong> is an object with minutes and seconds and <strong>total_seconds</strong> contains the number of seconds until we reach 00:00.</p>
<p>We will need to set methods that will allow us to:</p>
<ul>
<li><strong>set</strong> a time to count from</li>
<li><strong>stop</strong> the timer </li>
<li><strong>start</strong> it.</li>
</ul>
<p>We also ned to set some callback functions that will be executed on each tick of the timer   &#8211; <strong> fn_tick</strong> &#8211;  and one that will execute when the timer reaches 00:00 named <strong>fn_end.</strong></p>
<p>We won&#8217;t make a callback for start because we know when this occurs  we can trigger it by ourselves.</p>
<h2>The countDown timer will look like this:</h2>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> my_timer <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> countDown<span style="color: #009900;">&#40;</span> minutes<span style="color: #339933;">,</span> seconds<span style="color: #339933;">,</span> fn_tick<span style="color: #339933;">,</span> fn_complete<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>on this we will be able to apply</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">my_timer.<span style="color: #660066;">set</span><span style="color: #009900;">&#40;</span> minutes<span style="color: #339933;">,</span> seconds <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
my_timer.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
my_tmer.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Below is the code that defines the countDown (pretty simple).</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> countDown <span style="color: #339933;">=</span>  <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> m <span style="color: #339933;">,</span> s<span style="color: #339933;">,</span> fn_tick<span style="color: #339933;">,</span> fn_end  <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#123;</span>
		total_sec<span style="color: #339933;">:</span>m<span style="color: #339933;">*</span><span style="color: #CC0000;">60</span><span style="color: #339933;">+</span>s<span style="color: #339933;">,</span>
		timer<span style="color: #339933;">:</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">timer</span><span style="color: #339933;">,</span>
		set<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>m<span style="color: #339933;">,</span>s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">total_sec</span> <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>m<span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #CC0000;">60</span><span style="color: #339933;">+</span>parseInt<span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">time</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>m<span style="color: #339933;">:</span>m<span style="color: #339933;">,</span>s<span style="color: #339933;">:</span>s<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		start<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> self <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">timer</span> <span style="color: #339933;">=</span> setInterval<span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>self.<span style="color: #660066;">total_sec</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					self.<span style="color: #660066;">total_sec</span><span style="color: #339933;">--;</span>
					self.<span style="color: #660066;">time</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span> m <span style="color: #339933;">:</span> parseInt<span style="color: #009900;">&#40;</span>self.<span style="color: #660066;">total_sec</span><span style="color: #339933;">/</span><span style="color: #CC0000;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> s<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span>self.<span style="color: #660066;">total_sec</span><span style="color: #339933;">%</span>60<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
					fn_tick<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
				<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
					self.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					fn_end<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1000</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		<span style="color: #000066;">stop</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			clearInterval<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">timer</span><span style="color: #009900;">&#41;</span>
			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">time</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>m<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>s<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">total_sec</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And now to use it in our code we will do something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> my_timer <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> countDown<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span> <span style="color: #339933;">,</span> <span style="color: #CC0000;">5</span> <span style="color: #339933;">,</span>
	<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #009900;">&#123;</span>
		<span style="color: #006600; font-style: italic;">//something here...</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
	<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #006600; font-style: italic;">// something here...</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
my_timer.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Ok, the above example is useless, we will need to display the current time on each tick of the countdown times (so on each second) and at the end we&#8217;ll have to alert the user when we reached 00:00.</p>
<p>We will also need some interface elements to access the countdown methods and to display the current time.</p>
<p>For this we will create a label named <strong>display_lbl</strong>, that will show the time and also 3 buttons : <strong>set_btn</strong> , <strong>start_btn</strong> and <strong>stop_btn</strong>.</p>
<p>Creating the code is pretty simple so I won&#8217;t put the code here but you will be able to take a look at it <a href="http://cssgallery.info/wp-content/countdown_tutorial.zip">downloading the countdown project</a>.</p>
<p>What is most important is to connect the interface with the countdown timer.</p>
<p>So we create the timer  and set the <strong>fn_tick</strong> and <strong>fn_end</strong> functions</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> my_timer <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> countDown<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">5</span><span style="color: #339933;">,</span><span style="color: #CC0000;">30</span><span style="color: #339933;">,</span> 
		<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			display_lbl.<span style="color: #660066;">text</span> <span style="color: #339933;">=</span> my_timer.<span style="color: #660066;">time</span>.<span style="color: #660066;">m</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot; : &quot;</span><span style="color: #339933;">+</span>my_timer.<span style="color: #660066;">time</span>.<span style="color: #660066;">s</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;The time is up!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And this is how we connect the buttons with <strong>my_timer</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&nbsp;
set_btn.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	display_lbl.<span style="color: #660066;">text</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;5 : 30&quot;</span><span style="color: #339933;">;</span>
	my_timer.<span style="color: #660066;">set</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">5</span><span style="color: #339933;">,</span><span style="color: #CC0000;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
stop_btn.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	my_timer.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
start_btn.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	my_timer.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As you see we also set the label&#8217;s text to the initial value when we set the timer because otherwise we&#8217;ll loose the first second. We do this here to keep the timer object clean of any external interaction so we can use it even without an interface.</p>
<h2>This is how the final project looks like</h2>
<p><img src="http://cssgallery.info/wp-content/uploads/2010/05/capture-1.png" alt="Countdown timer with Appcelerator" title="Countdown timer with Appcelerator" width="464" height="558" class="alignnone size-full wp-image-1208" /></p>
<p>Please keep in mind that this is just a simple example and we don&#8217;t have a control mechanism to detect when the user stopped the timer or it reached by itself 00:00 &#8211; but you can add it as an exercise <img src='http://cssgallery.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>You can download the <strong>Resources</strong> folder of the  project from <a href="http://cssgallery.info/wp-content/countdown_tutorial.zip">here</a>.</p>
<p>Everything is MIT licensed and you can use it in any application you want to, but spreading the word would be nice.</p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
<a href="http://nosoloweb.es/crear-un-temporizador-regresivo-con-titanium-appcelerator/" rel="me">Crear un temporizador regresivo con Titanium Appcelerator</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator&amp;description=How%20to%20create%20a%20countdown%20timer%20for%20your%20iPhone%20with%20Titanium%20Appcelerator.%20Source%20code%20available%20for%20download.%20" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;t=Create+a+countdown+timer+with+Titanium+Appcelerator" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator&amp;srcUrl=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;srcTitle=Create+a+countdown+timer+with+Titanium+Appcelerator&amp;snippet=How%20to%20create%20a%20countdown%20timer%20for%20your%20iPhone%20with%20Titanium%20Appcelerator.%20Source%20code%20available%20for%20download.%20" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Fonts tutorial</title>
		<link>http://cssgallery.info/google-fonts-tutorial/</link>
		<comments>http://cssgallery.info/google-fonts-tutorial/#comments</comments>
		<pubDate>Thu, 20 May 2010 11:43:57 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Development tools]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[fonts api tutorial]]></category>
		<category><![CDATA[free fonts]]></category>
		<category><![CDATA[google api]]></category>
		<category><![CDATA[google fonts api]]></category>
		<category><![CDATA[google fonts api tutorial]]></category>
		<category><![CDATA[google fonts example]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=1179</guid>
		<description><![CDATA[Google came with a new idea in their list of web toys.: a  font directory that allows you as a web developer to include some "fancy" fonts in your pages without struggle. We prepared a tutorial to teach you how to play with this new API and a test page so you can download the code and use it in your website.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fgoogle-fonts-tutorial%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fgoogle-fonts-tutorial%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Google came with a new idea in their list of web toys. A font directory that allows you as a web developer to include some &#8220;fancy&#8221; fonts in your pages without struggle.</p>
<h2>What is Google Fonts Directory all about?</h2>
<p>All the fonts in the Google Font Directory are licensed under open source licenses that let you use them on any website, from a private blog to a big commercial site. The idea seems to be good and comes to complete the Google AJAX Libraries API.</p>
<p>For now there are only a few fonts available but in time I think the list will grow.</p>
<h2>There are two ways to use this on your site</h2>
<p>The first one is simple and only requires a css file retrieved from Google&#8217;s servers like below:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; 
          href=&quot;http://fonts.googleapis.com/css?family=Tangerine&quot;&gt;
&nbsp;
    &lt;style&gt;
      body {
        font-family: 'Tangerine';
        font-size: 48px;
      }
    &lt;/style&gt;</pre></div></div>

<p>You need to specify the family of the font and if it contains spaces you need to replace this with a &#8220;+&#8221; (plus character) sign</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; 
          href=&quot;http://fonts.googleapis.com/css?family=Droid+Sans&quot;&gt;</pre></div></div>

<p>You can load multiple fonts in a single call. This will decrease the loading time because you use only one http request. The multiple fonts will be separated by a &#8220;|&#8221; ( pipe character ) sign.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; 
          href=&quot;http://fonts.googleapis.com/css?family=Tangerine|Inconsolata|Droid+Sans&quot;&gt;</pre></div></div>

<p>Normaly the fonts are loaded using the regular version but you have more control over the loaded font <strong>using some selectors</strong> for the style and weight, using a &#8220;:&#8221; ( colon character ) sign, and the values if more than one separated by a &#8220;,&#8221; ( comma )</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; 
          href=&quot;http://fonts.googleapis.com/css?family=Tangerine:bold,bolditalic&quot;&gt;</pre></div></div>

<p>The<strong> style</strong> and <strong>weight</strong> of the font can be specified using a fullname, an abbreviation or a numeric value ( for weight )</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">bold:b
bold:700
italic:i
bolditalic:bi</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; 
          href=&quot;http://fonts.googleapis.com/css?family=Cantarell:i|Droid+Serif:700&quot;&gt;</pre></div></div>

<p>Take into account that not all the fonts have the styles you might need so first of all verify in the font directory if it does. </p>
<h2>The second option</h2>
<p>The second option to load the fonts is to use the webloader (Javascript) that Google offer for this. This script can be called directly ( which is faster) or using their AJAX API functions. The main advantage of this method is that you can load fonts provided by TypeKit and Google or from any other font provider at the same time from the same library.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">WebFont.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    google<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
      families<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span> <span style="color: #3366CC;">'Tangerine'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Cantarell'</span> <span style="color: #009900;">&#93;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
    typekit<span style="color: #339933;">:</span> <span style="color: #3366CC;">'myKitId'</span><span style="color: #339933;">,</span>
&nbsp;
    custom<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> 
       families<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'OneFont'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'AnotherFont'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
       urls<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span> <span style="color: #3366CC;">'http://myotherwebfontprovider.com/stylesheet1.css'</span><span style="color: #339933;">,</span>
       <span style="color: #3366CC;">'http://yetanotherwebfontprovider.com/stylesheet2.css'</span> <span style="color: #009900;">&#93;</span> 
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The disadvantage of this method is the increased loading time comparing to the simple method.</p>
<h2>Other things to consider</h2>
<p>Loading external fonts is slow, at least the first time, until the font is cached on the visitor&#8217;s computer. Don&#8217;t overuse it.</p>
<p>You need to specify a fallback version for the font in case the browser is not supported. Here the browser uses a serif font in case it&#8217;s not able to load the &#8220;Tangerine&#8221; one.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">  body <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'Tangerine'</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">48px</span><span style="color: #00AA00;">;</span>
      <span style="color: #00AA00;">&#125;</span></pre></div></div>

<h2>The crossbrowsing issue</h2>
<p>Each browser behaves in a different way, of course IE being the worse. To make a consistent behaviour across all the supported browsers you should use the webloader. This gives you the chance to display the styled elements with an initial font until the requested font file is loaded, and when this occurs to change it.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">    <span style="color: #6666ff;">.wf-inactive</span> p <span style="color: #00AA00;">&#123;</span> // Show paragraphs in <span style="color: #993333;">serif</span> <span style="color: #000000; font-weight: bold;">font</span> until fonts have loaded.
    <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">serif</span>
  <span style="color: #00AA00;">&#125;</span>
  <span style="color: #6666ff;">.wf-active</span> p <span style="color: #00AA00;">&#123;</span> // Show paragraphs in Tangerine when the fonts have loaded.
    <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'Tangerine'</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span>
  <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>If the number of fonts will increase then Google Fonts Directory will be a good alternative compared to other webfonts providers that offer this as a paid service. But you still can have fun with it, I&#8217;m sure google will continue to improve this service.</p>
<h2>Check the demo</h2>
<p>A demo page can be seen <a href="http://cssgallery.info/wp-content/google-fonts-tutorial-demo.html">here</a>. Interesting to see how IE behaves. <img src='http://cssgallery.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>More resources</h2>
<p><a href="http://code.google.com/webfonts">Google Font Directory</a><br />
<a href="http://code.google.com/apis/webfonts/">Google Fonts Directory API</a></p>
<p>and of course </p>
<p><a href="http://typekit.com/">Typekit</a></p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
<a href="http://nosoloweb.es/tutorial-de-fuentes-de-google/" rel="me">Tutorial de Fuentes de Google</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/google-fonts-tutorial/&amp;title=Google+Fonts+tutorial&amp;description=Google%20came%20with%20a%20new%20idea%20in%20their%20list%20of%20web%20toys.%3A%20a%20%20font%20directory%20that%20allows%20you%20as%20a%20web%20developer%20to%20include%20some%20%22fancy%22%20fonts%20in%20your%20pages%20without%20struggle.%20We%20prepared%20a%20tutorial%20to%20teach%20you%20how%20to%20play%20with%20this%20new%20API%20and%20a%20test%20page%20so%20you%20can%20download%20the%20code%20and%20use%20it%20in%20your%20website." rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/google-fonts-tutorial/&amp;title=Google+Fonts+tutorial" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/google-fonts-tutorial/&amp;title=Google+Fonts+tutorial" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/google-fonts-tutorial/&amp;title=Google+Fonts+tutorial" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/google-fonts-tutorial/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/google-fonts-tutorial/&amp;title=Google+Fonts+tutorial" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/google-fonts-tutorial/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/google-fonts-tutorial/&amp;t=Google+Fonts+tutorial" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/google-fonts-tutorial/&amp;title=Google+Fonts+tutorial" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/google-fonts-tutorial/&amp;title=Google+Fonts+tutorial&amp;srcUrl=http://cssgallery.info/google-fonts-tutorial/&amp;srcTitle=Google+Fonts+tutorial&amp;snippet=Google%20came%20with%20a%20new%20idea%20in%20their%20list%20of%20web%20toys.%3A%20a%20%20font%20directory%20that%20allows%20you%20as%20a%20web%20developer%20to%20include%20some%20%22fancy%22%20fonts%20in%20your%20pages%20without%20struggle.%20We%20prepared%20a%20tutorial%20to%20teach%20you%20how%20to%20play%20with%20this%20new%20API%20and%20a%20test%20page%20so%20you%20can%20download%20the%20code%20and%20use%20it%20in%20your%20website." rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/google-fonts-tutorial/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/google-fonts-tutorial/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to make a glowing menu with MooTools in 3 easy steps</title>
		<link>http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/</link>
		<comments>http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 12:11:17 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[glowing menu]]></category>
		<category><![CDATA[how to make a menu]]></category>
		<category><![CDATA[javascript menu]]></category>
		<category><![CDATA[mootools tutorial]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=906</guid>
		<description><![CDATA[<h3>Ingredients:</h3> sprites, unorderdered lists, Mootools knowledge.
<h3>Cooking time:</h3> 1 hr
<h3>Result:</h3>
Can be seen on our website -  <a title="Rborn web development agency" href="http://rborn.info" target="_blank">Rborn Web development</a> -  mouse-over the top menu.
<img class="alignnone size-full wp-image-907" title="Rborn web development glowing menu" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-13.png" alt="Rborn web development glowing menu" width="380" height="110" />]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fhow-to-make-a-glowing-menu-with-mootools-in-3-easy-steps%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fhow-to-make-a-glowing-menu-with-mootools-in-3-easy-steps%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Ingredients:</strong> sprites, unorderdered lists, Mootools knowledge.<br />
<strong>Cooking time:</strong> 1 hr<br />
<strong>Result:</strong><br />
Can be seen on our website &#8211;  <a title="Rborn web development agency" href="http://rborn.info" target="_blank">Rborn Web development</a> &#8211;  mouse-over the top menu.<br />
<img class="alignnone size-full wp-image-907" title="Rborn web development glowing menu" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-13.png" alt="Rborn web development glowing menu" width="380" height="110" /></p>
<h2>Preparation of the Mootools glowing menu</h2>
<p>The menu is a list containing an <strong>A</strong> tag for each menu item. We are using <em>sprites</em> and <em>text-indent:-5000px</em> for accessibility purposes. <strong>The trick</strong> is that we use the image <strong>positioned top for LI</strong> and <strong>bottom for A HREF</strong></p>
<p><img class="alignnone size-full wp-image-908" title="menu sprite" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-23.png" alt="" width="83" height="151" /></p>
<h2>Step 1: cook the HTML code</h2>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;ul id=&quot;mainnav&quot;&gt;
&lt;li&gt;&lt;a href=&quot;/&quot;&gt;home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;products&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;portfolio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/blog/&quot;&gt;news&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;contact&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre></div></div>

<h2>Step 2: add the CSS code</h2>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">li<span style="color: #6666ff;">.home</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../img/home.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
li<span style="color: #6666ff;">.home</span> a <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">29px</span><span style="color: #00AA00;">;</span>background<span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../img/home.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">bottom</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>This is the positioning of the background image I was talking about earlier.<br />
Now the magic of the glowing is made with few lines of code using MooTools.</p>
<h2>Step 3: spice with MooTools code</h2>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'mainnav'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getElements</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">hasClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'clicked'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">setStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'opacity'</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0.01</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'mouseenter'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>        
<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">fade</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'mouseleave'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">fade</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0.01</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>The code is triggered either on <strong>domready</strong> event, or put inside a <strong>script</strong> tag just before the body ends  so have the dom loaded and ready to be accessed by javascript.</p>
<p>Basically all we are doing is to get all the <strong>A</strong> tags inside the menu, set the opacity to <strong>0.01</strong> because if you set it to <strong>0</strong> MooTools will add <strong>display:none</strong> to the style and the links won&#8217;t be visible anymore.</p>
<p>Further we play with the <strong>fade</strong> method to increase the <strong>opacity</strong> to <strong>1</strong> or decrease back to <strong>0.01</strong> on the <strong>mouseenter</strong> and <strong>mouseleave</strong> event.</p>
<p>We also check if the menu is active or not &#8211; we are on the menu  page or not &#8211;  verifying if the item has a <strong>class &#8216;clicked&#8217;</strong>, set by the backend. If the item contains this class  we simply leave it alone and the item is <strong>&#8216;on&#8217;</strong> all the time.</p>
<p>That&#8217;s it. Let me know your thoughts.</p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
<a href="http://nosoloweb.es/como-hacer-menu-brillante-mootools/" rel="me">Cómo hacer un menú brillante con MooTools en 3 pasos</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/&amp;title=How+to+make+a+glowing+menu+with+MooTools+in+3+easy+steps&amp;description=Ingredients%3A%20sprites%2C%20unorderdered%20lists%2C%20Mootools%20knowledge.%0D%0ACooking%20time%3A%201%20hr%0D%0AResult%3A%0D%0ACan%20be%20seen%20on%20our%20website%20-%20%20Rborn%20Web%20development%20-%20%20mouse-over%20the%20top%20menu.%0D%0A" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/&amp;title=How+to+make+a+glowing+menu+with+MooTools+in+3+easy+steps" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/&amp;title=How+to+make+a+glowing+menu+with+MooTools+in+3+easy+steps" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/&amp;title=How+to+make+a+glowing+menu+with+MooTools+in+3+easy+steps" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/&amp;title=How+to+make+a+glowing+menu+with+MooTools+in+3+easy+steps" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/&amp;t=How+to+make+a+glowing+menu+with+MooTools+in+3+easy+steps" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/&amp;title=How+to+make+a+glowing+menu+with+MooTools+in+3+easy+steps" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/&amp;title=How+to+make+a+glowing+menu+with+MooTools+in+3+easy+steps&amp;srcUrl=http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/&amp;srcTitle=How+to+make+a+glowing+menu+with+MooTools+in+3+easy+steps&amp;snippet=Ingredients%3A%20sprites%2C%20unorderdered%20lists%2C%20Mootools%20knowledge.%0D%0ACooking%20time%3A%201%20hr%0D%0AResult%3A%0D%0ACan%20be%20seen%20on%20our%20website%20-%20%20Rborn%20Web%20development%20-%20%20mouse-over%20the%20top%20menu.%0D%0A" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create a nifty tooltip in Titanium</title>
		<link>http://cssgallery.info/create-a-nifty-tooltip-in-titanium/</link>
		<comments>http://cssgallery.info/create-a-nifty-tooltip-in-titanium/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 18:16:59 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[nifty]]></category>
		<category><![CDATA[titanium]]></category>
		<category><![CDATA[Titanium how-to]]></category>
		<category><![CDATA[tooltip]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=798</guid>
		<description><![CDATA[How to create a tooltip to those that are using Titanium to develop their iPhone apps. Download the code and test it by yourself.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fcreate-a-nifty-tooltip-in-titanium%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fcreate-a-nifty-tooltip-in-titanium%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In this post I will show how to create a tooltip to those that are using Titanium to develop their iPhone apps.<br />
Sometimes when we set a button with an icon &#8211;  lets say in navbar &#8211;  a simple icon is not enough to make the user understand what the button is supposed to do.</p>
<h3>For example this one:</h3>
<p><img class="alignnone size-full wp-image-799" title="capture-1" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-12.png" alt="" width="320" height="132" /></p>
<p>What would the <strong>rightNavButton</strong> do ? The application is an ebook reader &#8211; if this helps, but I&#8217;m sure it will not&#8230;.</p>
<h3>What about this:</h3>
<p><a href="http://cssgallery.info/wp-content/uploads/2010/04/capture-22.png"><img class="alignnone size-full wp-image-800" title="capture-2" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-22.png" alt="" width="320" height="132" /></a></p>
<p>Now you know that by hitting this button you can continue your reading &#8211;  in case something took you out from the chapter, like  changing a setting, or answering the phone or whatever&#8230;</p>
<p>So let&#8217;s start.</p>
<p>The tooltip is a simple view with the tip image set as background:<br />
<img class="alignnone size-full wp-image-804" title="bubble" src="http://cssgallery.info/wp-content/uploads/2010/04/bubble.png" alt="" width="205" height="57" /></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> lasttipView <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
width<span style="color: #339933;">:</span><span style="color: #CC0000;">205</span><span style="color: #339933;">,</span>
height<span style="color: #339933;">:</span><span style="color: #CC0000;">57</span><span style="color: #339933;">,</span>
backgroundImage<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;img/bubble.png&quot;</span><span style="color: #339933;">,</span>
top<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
right<span style="color: #339933;">:</span><span style="color: #CC0000;">3</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The &#8220;Continue reading&#8221; is a simple label added to this view</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> lasttipLabel <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createLabel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
text<span style="color: #339933;">:</span><span style="color: #3366CC;">'Continue reading'</span><span style="color: #339933;">,</span>
color<span style="color: #339933;">:</span><span style="color: #3366CC;">'#fff'</span><span style="color: #339933;">,</span>
width<span style="color: #339933;">:</span><span style="color: #CC0000;">205</span><span style="color: #339933;">,</span>
height<span style="color: #339933;">:</span><span style="color: #CC0000;">34</span><span style="color: #339933;">,</span>
top<span style="color: #339933;">:</span><span style="color: #CC0000;">16</span><span style="color: #339933;">,</span>
font<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
fontFamily<span style="color: #339933;">:</span><span style="color: #3366CC;">'Helvetica Neue'</span><span style="color: #339933;">,</span>
fontSize<span style="color: #339933;">:</span><span style="color: #CC0000;">13</span><span style="color: #339933;">,</span>
fontWeight<span style="color: #339933;">:</span><span style="color: #3366CC;">'bold'</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
textAlign<span style="color: #339933;">:</span><span style="color: #3366CC;">'center'</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
lasttipView.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>lasttipLabel<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>and the index window contains the tip view</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">index_win.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>lasttipView<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I supposed we already have the index_win created.</p>
<p>Now when we open the index_win the tooltip will be there and the user will know what the <strong>rightNavButton</strong> does. But if the tooltip stays there it becomes annoying so we need to find a way to hide it. I choose to hide it when the user clicks the button by using a smooth fadeout.</p>
<p>The code below creates an animation and attaches it to the click event.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> anim_out <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createAnimation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
anim_out.<span style="color: #660066;">opacity</span><span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
anim_out.<span style="color: #660066;">duration</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">250</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
last_read <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createButton</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
image<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;img/tag1.png&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
last_read.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
lasttipView.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span>anim_out<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
index_win.<span style="color: #660066;">setRightNavButton</span><span style="color: #009900;">&#40;</span> last_read <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Ok, here is the button code too but for simplicity I removed some parts that actually display the chapter and trigger other functions.</p>
<p>That&#8217;s all. Pretty simple, isn&#8217;t it ?</p>
<p><strong> PS.</strong> You can use the bubble image in your apps if you want, only just let me know &#8211; and if you are curious about the app here it is:<br />
<a title="Youth, Isaac Asimov iPhone ebook" href="itms://itunes.apple.com/us/app/youth-isaac-asimov/id367433025?mt=8" target="_blank"><img class="alignnone size-full wp-image-806" title="Youth -  Isaac Asimov iBook" src="http://cssgallery.info/wp-content/uploads/2010/04/iconapp.png" alt="" width="57" height="57" /> Youth, by Isaac Asimov iPhone ebook.</a></p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
<a href="http://nosoloweb.es/crear-un-tooltip-en-titanium/" rel="me">Crear una ingeniosa herramienta de notificación en Titanium</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium&amp;description=How%20to%20create%20a%20tooltip%20to%20those%20that%20are%20using%20Titanium%20to%20develop%20their%20iPhone%20apps.%20Download%20the%20code%20and%20test%20it%20by%20yourself." rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;t=Create+a+nifty+tooltip+in+Titanium" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium&amp;srcUrl=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;srcTitle=Create+a+nifty+tooltip+in+Titanium&amp;snippet=How%20to%20create%20a%20tooltip%20to%20those%20that%20are%20using%20Titanium%20to%20develop%20their%20iPhone%20apps.%20Download%20the%20code%20and%20test%20it%20by%20yourself." rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/create-a-nifty-tooltip-in-titanium/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom row for TableView in Appcelerator Titanium</title>
		<link>http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/</link>
		<comments>http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 12:07:39 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[Appcelerator]]></category>
		<category><![CDATA[custom table rows]]></category>
		<category><![CDATA[rows]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[titanium]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=763</guid>
		<description><![CDATA[In this post  I will explain how to create custom rows for TableViews using Titanium Mobile. The project source can be downloaded to play with.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fcustom-row-for-tableview-in-appcelerator-titanium%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fcustom-row-for-tableview-in-appcelerator-titanium%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In this post  I will try to explain how to create custom rows for TableViews using Titanium Mobile.</p>
<p>If you don&#8217;t know what <a title="Appcelerator Titanium" href="http://www.appcelerator.com/" target="_blank">Titanium</a> is about,  take a look <a title="Appcelerator Titanium" href="http://www.appcelerator.com/" target="_blank">here</a>. I suppose you already know how to setup and start a Titanium project so I&#8217;ll show only how to create a custom row.</p>
<p>By default a TableView will let you create a row that can have: the left image, the title and the row type decorator set. The next code is an example of the standard data that needs to be passed to a TableView.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> RegData <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
&nbsp;
<span style="color: #009900;">&#123;</span> leftImage<span style="color: #339933;">:</span><span style="color: #3366CC;">'es.png'</span><span style="color: #339933;">,</span> title<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Spain&quot;</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span> leftImage<span style="color: #339933;">:</span><span style="color: #3366CC;">'gb.png'</span><span style="color: #339933;">,</span> title<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;United Kingdom&quot;</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span> leftImage<span style="color: #339933;">:</span><span style="color: #3366CC;">'us.png'</span><span style="color: #339933;">,</span> title<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;United States&quot;</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span> leftImage<span style="color: #339933;">:</span><span style="color: #3366CC;">'fr.png'</span><span style="color: #339933;">,</span> title<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;France&quot;</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> TheTable <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createTableView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
data<span style="color: #339933;">:</span>RegData
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>And the result is this:</h3>
<p><a href="http://cssgallery.info/wp-content/uploads/2010/04/capture-11.png"><img class="alignnone size-full wp-image-790" title="Normal table rows" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-11.png" alt="" width="378" height="186" /></a></p>
<p>Ok, we would like to add more data to a row, maybe something like this:</p>
<p><a href="http://cssgallery.info/wp-content/uploads/2010/04/capture-21.png"><img class="alignnone size-full wp-image-791" title="Custom row example" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-21.png" alt="" width="378" height="47" /></a></p>
<p>This will require to build the row &#8220;by hand&#8221;. So we need to add a 2 imageViews, the <strong>flag</strong> and the <strong>trend</strong>, and  labelViews for the <strong>country</strong> and the <strong>percent</strong> . We also need to change the data array of course.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> CustomData <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
<span style="color: #009900;">&#123;</span> flag<span style="color: #339933;">:</span><span style="color: #3366CC;">'es.png'</span><span style="color: #339933;">,</span> country<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Spain&quot;</span><span style="color: #339933;">,</span> trend<span style="color: #339933;">:</span><span style="color: #3366CC;">'up.png'</span><span style="color: #339933;">,</span> percent<span style="color: #339933;">:</span><span style="color: #3366CC;">'28%'</span> <span style="color: #339933;">,</span>hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span> flag<span style="color: #339933;">:</span><span style="color: #3366CC;">'gb.png'</span><span style="color: #339933;">,</span> country<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;United Kingdom&quot;</span><span style="color: #339933;">,</span> trend<span style="color: #339933;">:</span><span style="color: #3366CC;">'down.png'</span><span style="color: #339933;">,</span> percent<span style="color: #339933;">:</span><span style="color: #3366CC;">'-3%'</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span> flag<span style="color: #339933;">:</span><span style="color: #3366CC;">'us.png'</span><span style="color: #339933;">,</span> country<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;United States&quot;</span><span style="color: #339933;">,</span> trend<span style="color: #339933;">:</span><span style="color: #3366CC;">'up.png'</span><span style="color: #339933;">,</span> percent<span style="color: #339933;">:</span><span style="color: #3366CC;">'8%'</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span> flag<span style="color: #339933;">:</span><span style="color: #3366CC;">'fr.png'</span><span style="color: #339933;">,</span> country<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;France&quot;</span><span style="color: #339933;">,</span> trend<span style="color: #339933;">:</span><span style="color: #3366CC;">'down.png'</span><span style="color: #339933;">,</span> percent<span style="color: #339933;">:</span><span style="color: #3366CC;">'-40%'</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>We create a <strong>data</strong> variable as an array that will hold the row objects generated.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> data<span style="color: #339933;">=</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>then we walk through the CustomData array, create  a new row , the imageViews and labels and add them to the row.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> CustomData.<span style="color: #660066;">length</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> row <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createTableViewRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> flag <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createImageView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
url<span style="color: #339933;">:</span>CustomData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">flag</span><span style="color: #339933;">,</span>
width<span style="color: #339933;">:</span><span style="color: #CC0000;">32</span><span style="color: #339933;">,</span>
height<span style="color: #339933;">:</span><span style="color: #CC0000;">32</span><span style="color: #339933;">,</span>
left<span style="color: #339933;">:</span><span style="color: #CC0000;">4</span><span style="color: #339933;">,</span>
top<span style="color: #339933;">:</span><span style="color: #CC0000;">2</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> country <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createLabel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
text<span style="color: #339933;">:</span>CustomData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">country</span><span style="color: #339933;">,</span>
font<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>fontSize<span style="color: #339933;">:</span><span style="color: #CC0000;">16</span><span style="color: #339933;">,</span>fontWeight<span style="color: #339933;">:</span><span style="color: #3366CC;">'bold'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
width<span style="color: #339933;">:</span><span style="color: #3366CC;">'auto'</span><span style="color: #339933;">,</span>
textAlign<span style="color: #339933;">:</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span>
top<span style="color: #339933;">:</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span>
left<span style="color: #339933;">:</span><span style="color: #CC0000;">40</span><span style="color: #339933;">,</span>
height<span style="color: #339933;">:</span><span style="color: #CC0000;">16</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> percent <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createLabel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
text<span style="color: #339933;">:</span>CustomData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">percent</span><span style="color: #339933;">,</span>
font<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>fontSize<span style="color: #339933;">:</span><span style="color: #CC0000;">12</span><span style="color: #339933;">,</span>fontWeight<span style="color: #339933;">:</span><span style="color: #3366CC;">'bold'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
width<span style="color: #339933;">:</span><span style="color: #3366CC;">'auto'</span><span style="color: #339933;">,</span>
textAlign<span style="color: #339933;">:</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span>
bottom<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
left<span style="color: #339933;">:</span><span style="color: #CC0000;">60</span><span style="color: #339933;">,</span>
height<span style="color: #339933;">:</span><span style="color: #CC0000;">12</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> trend <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createImageView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
url<span style="color: #339933;">:</span>CustomData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">trend</span><span style="color: #339933;">,</span>
width<span style="color: #339933;">:</span><span style="color: #CC0000;">16</span><span style="color: #339933;">,</span>
height<span style="color: #339933;">:</span><span style="color: #CC0000;">16</span><span style="color: #339933;">,</span>
right<span style="color: #339933;">:</span><span style="color: #CC0000;">10</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
row.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>flag<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
row.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>country<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
row.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>percent<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
row.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>trend<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
row.<span style="color: #660066;">hasChild</span><span style="color: #339933;">=</span>CustomData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">hasChild</span><span style="color: #339933;">;</span>
&nbsp;
row.<span style="color: #660066;">className</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'coutry_row'</span><span style="color: #339933;">;</span>
&nbsp;
data.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As you see we also add a <strong>className</strong> to the row to improve the rendering performance, as the iPhone will reuse the row template with every new data when rendering the table.</p>
<h3>The obtained result is this:</h3>
<p><a href="http://cssgallery.info/wp-content/uploads/2010/04/capture-41.png"><img class="alignnone size-full wp-image-792" title="Custom rows table" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-41.png" alt="" width="379" height="222" /></a></p>
<p>You can download the complete Titanium project from <a title="Custom rows titanium project" href="http://cssgallery.info/wp-content/TableCustomView.zip">here</a>. You will have to create a new project in Titanium and replace the resource folder with the one in the archive.</p>
<p>Let me know your thoughts.</p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
<a href="http://nosoloweb.es/filas-personalizadas-para-tableviews-con-titanium/" rel="me">Como crear filas personalizadas para TableViews usando Titanium Móvil</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium&amp;description=In%20this%20post%20%20I%20will%20explain%20how%20to%20create%20custom%20rows%20for%20TableViews%20using%20Titanium%20Mobile.%20The%20project%20source%20can%20be%20downloaded%20to%20play%20with." rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;t=Custom+row+for+TableView+in+Appcelerator+Titanium" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium&amp;srcUrl=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;srcTitle=Custom+row+for+TableView+in+Appcelerator+Titanium&amp;snippet=In%20this%20post%20%20I%20will%20explain%20how%20to%20create%20custom%20rows%20for%20TableViews%20using%20Titanium%20Mobile.%20The%20project%20source%20can%20be%20downloaded%20to%20play%20with." rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>3 free icons sets &#8211; webiconset.com</title>
		<link>http://cssgallery.info/3-free-icons-sets-webiconset-com/</link>
		<comments>http://cssgallery.info/3-free-icons-sets-webiconset-com/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 20:37:50 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Icons]]></category>
		<category><![CDATA[Aplication Icon Set]]></category>
		<category><![CDATA[Cute Blogging Icon]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[iconset]]></category>
		<category><![CDATA[Mobile Icons Set]]></category>
		<category><![CDATA[Webiconset]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=742</guid>
		<description><![CDATA[<a href="http://www.webiconset.com" target="_blank">Webiconset.com</a> offers to download three small sets of  icons( 10 icons per set ) for both personal and commercial use. The Icons are high quality and come in 4 sizes -  128, 64, 48 and 32 pixels, in png format.

<img class="alignnone size-full wp-image-743" title="capture-1" src="http://cssgallery.info/wp-content/uploads/2010/02/capture-1.png" alt="" width="450" height="451" />
]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2F3-free-icons-sets-webiconset-com%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2F3-free-icons-sets-webiconset-com%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.webiconset.com" target="_blank">Webiconset.com</a> offers for download three small sets of  icons (10 icons per set ) for both personal and commercial use. The Icons are high quality and come in 4 sizes &#8211;  128, 64, 48 and 32 pixels, in png format.</p>
<p><a href="http://cssgallery.info/wp-content/uploads/2010/02/capture-1.png"><img class="alignnone size-full wp-image-743" title="capture-1" src="http://cssgallery.info/wp-content/uploads/2010/02/capture-1.png" alt="" width="450" height="451" /></a></p>
<h2>Aplication Icon Set</h2>
<p> contains: Register, Settings, Users, Database, Login, Chat, Add, Delete, Edit, Invoice.</p>
<h2>Cute Blogging Icon</h2>
<p> Set has the next icons : Design, Download, Freelance, Part-time, Hire Me, Not Available, About Me, Services, My Blog, Contact.</p>
<p>while the last set<br />
<h2>Mobile Icons Set</h2>
<p> includes Phone Call, Photos, Messages, Calculator, Wireless, Calendar, Settings, Contacts, Notes, Map.</p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/3-free-icons-sets-webiconset-com/&amp;title=3+free+icons+sets+-+webiconset.com&amp;description=Webiconset.com%20offers%20to%20download%20three%20small%20sets%20of%20%20icons%28%2010%20icons%20per%20set%20%29%20for%20both%20personal%20and%20commercial%20use.%20The%20Icons%20are%20high%20quality%20and%20come%20in%204%20sizes%20-%20%20128%2C%2064%2C%2048%20and%2032%20pixels%2C%20in%20png%20format.%0D%0A%0D%0A%0D%0A" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/3-free-icons-sets-webiconset-com/&amp;title=3+free+icons+sets+-+webiconset.com" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/3-free-icons-sets-webiconset-com/&amp;title=3+free+icons+sets+-+webiconset.com" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/3-free-icons-sets-webiconset-com/&amp;title=3+free+icons+sets+-+webiconset.com" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/3-free-icons-sets-webiconset-com/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/3-free-icons-sets-webiconset-com/&amp;title=3+free+icons+sets+-+webiconset.com" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/3-free-icons-sets-webiconset-com/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/3-free-icons-sets-webiconset-com/&amp;t=3+free+icons+sets+-+webiconset.com" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/3-free-icons-sets-webiconset-com/&amp;title=3+free+icons+sets+-+webiconset.com" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/3-free-icons-sets-webiconset-com/&amp;title=3+free+icons+sets+-+webiconset.com&amp;srcUrl=http://cssgallery.info/3-free-icons-sets-webiconset-com/&amp;srcTitle=3+free+icons+sets+-+webiconset.com&amp;snippet=Webiconset.com%20offers%20to%20download%20three%20small%20sets%20of%20%20icons%28%2010%20icons%20per%20set%20%29%20for%20both%20personal%20and%20commercial%20use.%20The%20Icons%20are%20high%20quality%20and%20come%20in%204%20sizes%20-%20%20128%2C%2064%2C%2048%20and%2032%20pixels%2C%20in%20png%20format.%0D%0A%0D%0A%0D%0A" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/3-free-icons-sets-webiconset-com/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/3-free-icons-sets-webiconset-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
