<?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>Romain Guy &#187; Android</title>
	<atom:link href="http://www.curious-creature.org/category/android/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.curious-creature.org</link>
	<description></description>
	<lastBuildDate>Sun, 19 Feb 2012 02:23:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Android apps: Magic Hour and X-Men</title>
		<link>http://www.curious-creature.org/2011/06/02/android-apps-magic-hour-and-x-men/</link>
		<comments>http://www.curious-creature.org/2011/06/02/android-apps-magic-hour-and-x-men/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 06:01:19 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/?p=1301</guid>
		<description><![CDATA[I was delighted to find these two applications on Android Market today. The first, Magic Hour is a great camera/photo editing application. I could write at length about its user interface and editing features, but it&#8217;s the built-in filters market that makes Magic Hour so interesting and fun to use. Magic Hour is now my [...]]]></description>
			<content:encoded><![CDATA[<p>I was delighted to find these two applications on <a href="http://market.android.com">Android Market</a> today. The first, <a href="http://market.android.com/details?id=com.kiwiple.mhm">Magic Hour</a> is a great camera/photo editing application. I could write at length about its user interface and editing features, but it&#8217;s the built-in filters market that makes <em>Magic Hour</em> so interesting and fun to use. <em>Magic Hour</em> is now my photo-taking application of choice, and the first Android application to make me abandon <em>Vignette</em>.</p>
<p>The second application is a game by Konami called <a href="http://market.android.com/details?id=com.konami.xmen">X-Men</a>. This game was originally released in the arcades in 1992. The game is a lot of fun but don&#8217;t expect to be able to easily finish it without abusing the continue system.</p>
<p><a href="http://www.curious-creature.org/2011/06/02/android-apps-magic-hour-and-x-men/magichour/" rel="attachment wp-att-1302"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2011/06/magichour.png" alt="A fantastic camera application for Android" title="Magic Hour" width="585" height="950" class="aligncenter size-full wp-image-1302 nofotomoto" /></a><br />
<a href="http://market.android.com/details?id=com.konami.xmen"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2011/06/xmen.png" alt="The Android port of the 1992 arcade original" title="X-Men" width="950" height="504" class="aligncenter size-full wp-image-1305 nofotomoto" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2011/06/02/android-apps-magic-hour-and-x-men/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Android presentations at Google I/O 2011</title>
		<link>http://www.curious-creature.org/2011/05/12/android-presentations-at-google-io-2011/</link>
		<comments>http://www.curious-creature.org/2011/05/12/android-presentations-at-google-io-2011/#comments</comments>
		<pubDate>Fri, 13 May 2011 06:05:39 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Conference]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/?p=1286</guid>
		<description><![CDATA[I had the chance to spend two full days at Google I/O 2011 earlier this week and I enjoyed spending so much time talking with many Android developers. You guys are doing an amazing job and I can&#8217;t wait to download and use some of the apps you showed me! Google I/O was also the [...]]]></description>
			<content:encoded><![CDATA[<p>I had the chance to spend two full days at <a href="http://www.google.com/events/io/2011/">Google I/O 2011</a> earlier this week and I enjoyed spending so much time talking with many Android developers. You guys are doing an amazing job and I can&#8217;t wait to download and use some of the apps you showed me!</p>
<p>Google I/O was also the occasion for me to give two presentations about Android with my friend and colleague <a href="http://graphics-geek.blogspot.com/">Chet Haase</a>: <em>Honeycomb Highlights</em> and <em>Android Accelerated Rendering</em>. I am happy to announce that the slides for both these sessions are now available.</p>
<p><img src="http://www.curious-creature.org/blog/wp-content/uploads/2011/05/googleio_logo.png" alt="" title="Google I/O 2011" width="950" height="285" class="aligncenter size-full wp-image-1289 nofotomoto" /></p>
<p><span id="more-1286"></span></p>
<p>Our first session, <em>Honeycomb Highlights</em>, is an overview of the new features for users and developers you can find in Android 3.0:</p>
<ul>
<li><a href="http://www.youtube.com/watch?v=sTx-5CGDvM8">Watch the video on YouTube</a></li>
<li><a href="http://goo.gl/1crq2">Watch the slides online</a></li>
<li><a href="http://goo.gl/fqRXS">Download the slides (PDF)</a></li>
<li><a href="http://goo.gl/Br39W">Download the slides (Apple Keynote)</a></li>
</ul>
<p>Our second session, <em>Android Accelerated Rendering</em>, explains how to use the new OpenGL 2D rendering pipeline in your applications:</p>
<ul>
<li><a href="http://www.youtube.com/watch?v=v9S5EO7CLjo">Watch the video on YouTube</a></li>
<li><a href="http://goo.gl/KR1nC">Watch the slides online</a></li>
<li><a href="http://goo.gl/3fGty">Download the slides (PDF)</a></li>
<li><a href="http://goo.gl/ZqXQD">Download the slides (PDF, with speaker notes)</a></li>
<li><a href="http://goo.gl/OvCl5">Download the slides (Apple Keynote)</a></li>
</ul>
<p>You can also <a href="http://code.google.com/p/xlarge-demos">download the source code</a> of our animations demo from Google Code. This demo also shows how to properly use hardware acceleration and hardware layers.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2011/05/12/android-presentations-at-google-io-2011/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Source code for Android 3.0 animation demo</title>
		<link>http://www.curious-creature.org/2011/02/22/source-code-for-android-3-0-animation-demo/</link>
		<comments>http://www.curious-creature.org/2011/02/22/source-code-for-android-3-0-animation-demo/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 23:54:09 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/?p=1273</guid>
		<description><![CDATA[I published last week a video of a simple Android 3.0 animation demo and I promised I would publish the source code as soon as possible. I am happy to tell you that it is now available on Google Code. The application is pretty simple and shows how to use some of the new Android [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.curious-creature.org/2011/02/22/source-code-for-android-3-0-animation-demo/hc_demo-2/" rel="attachment wp-att-1276"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2011/02/hc_demo1.png" alt="Android 3.0 animation demo" title="Android 3.0 animation demo" width="950" height="558" class="aligncenter size-full wp-image-1276" /></a></p>
<p>I published last week <a href="http://www.curious-creature.org/2011/02/18/android-3-0-animations-demo/">a video of a simple Android 3.0 animation demo</a> and I promised I would publish the source code as soon as possible. I am happy to tell you that it is <a href="http://code.google.com/p/xlarge-demos/">now available on Google Code</a>.</p>
<p><span id="more-1273"></span></p>
<p>The application is pretty simple and shows how to use some of the new Android 3.0 APIs, including:</p>
<ul>
<li><a href="http://d.android.com/reference/android/animation/ObjectAnimator.html">Object animators</a></li>
<li><a href="http://d.android.com/reference/android/animation/ValueAnimator.html#reverse()">Animations reversal</a></li>
<li><a href="http://d.android.com/reference/android/view/View.html#setX(float)">New view properties</a></li>
<li><a href="http://d.android.com/reference/android/view/View.html#setLayerType(int,%20android.graphics.Paint)">Hardware layers</a></li>
</ul>
<p>This app also serves as a good example of how to use:</p>
<ul>
<li><a href="http://code.google.com/p/xlarge-demos/source/browse/trunk/PhotoAlbum/src/com/example/android/photoalbum/VerticalLabelView.java">Custom views</a></li>
<li><a href="http://code.google.com/p/xlarge-demos/source/browse/trunk/PhotoAlbum/src/com/example/android/photoalbum/DeckLayout.java">Custom layouts</a></li>
<li>Bitmap drawing</li>
</ul>
<p><a href="http://code.google.com/p/xlarge-demos/">Check it out!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2011/02/22/source-code-for-android-3-0-animation-demo/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Android 3.0 animations demo</title>
		<link>http://www.curious-creature.org/2011/02/18/android-3-0-animations-demo/</link>
		<comments>http://www.curious-creature.org/2011/02/18/android-3-0-animations-demo/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 16:07:35 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/?p=1260</guid>
		<description><![CDATA[Watch in full 720p. This is a very simple demo that shows how to use some of the new Android 3.0 APIs.]]></description>
			<content:encoded><![CDATA[<p><iframe title="YouTube video player" width="950" height="562" src="http://www.youtube.com/embed/kOyOvT6Sp_o?rel=0&amp;hd=1&amp;vq=hd720" frameborder="0" allowfullscreen></iframe></p>
<p><a href="http://www.youtube.com/watch_popup?v=kOyOvT6Sp_o&#038;vq=hd720">Watch in full 720p</a>. This is a very simple demo that shows how to use some of the new Android 3.0 APIs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2011/02/18/android-3-0-animations-demo/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Bitmap quality, banding and dithering</title>
		<link>http://www.curious-creature.org/2010/12/08/bitmap-quality-banding-and-dithering/</link>
		<comments>http://www.curious-creature.org/2010/12/08/bitmap-quality-banding-and-dithering/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 07:22:08 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/?p=1218</guid>
		<description><![CDATA[Android 2.3 is finally out! I recently mentioned changes to default bitmaps and windows formats we made in Gingerbread and I would like to explain why these changes were made. I will also show you the difference between Android&#8217;s various bitmap formats and why you must use them carefully. Early Android devices had limited memory [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://d.android.com">Android 2.3</a> is finally out! I recently mentioned <a href="http://www.curious-creature.org/2010/12/04/gingerbread-and-32-bits-windows/">changes to default bitmaps and windows formats</a> we made in Gingerbread and I would like to explain why these changes were made. I will also show you the difference between Android&#8217;s various bitmap formats and why you must use them carefully.</p>
<p><span id="more-1218"></span></p>
<p>Early Android devices had limited memory and computing power and to optimize the system we chose to draw opaque applications, by default, on 16 bits surfaces. The encoding format we use for 16 bits opaque pixels is called <code>RGB_565</code>: red and blue components have 5 bits of precision, and green has 6 bits of precision. This work relatively well but can lead to severe visual artifacts when drawing with bitmaps encoded in other formats. The two other formats supported by Android are <code>ARGB_8888</code> and <code>ARGB_4444</code>.  Both formats allow the encoding of an alpha channel for translucency and only differ in the precision of the components. <code>ARGB_8888</code> requires twice the amount of memory, as each pixel is encoded with 32 bits, but provides the best quality. It is also the format we use automatically when loading bitmaps with an alpha channel (PNG resources for instance.) You should ignore <code>ARGB_4444</code>, unless you really know what you are doing, because it looks awful.</p>
<p>What does it all mean for your application? To make it easier to understand, I wrote <a href="/data/BitmapConfig.zip">a simple application you can run on your device</a>, or on the emulator, to compare the quality and performance of various source and destination formats. The application contains two activities, one running in 16 bits, and one running in 32 bits. When launched, each activity lets you switch between bitmaps loaded in the 3 formats I described earlier. You can also enable dithering and profiling.</p>
<p>Let&#8217;s start by comparing the three bitmap formats as they appear when drawn on a 16 bits window (click on the image for a full-size version that will make the differences more obvious):</p>
<p><a href="http://www.curious-creature.org/blog/wp-content/uploads/2010/12/bitmap_formats.png"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/12/bitmap_formats_small.png" alt="Comparison for Android&#039;s three bitmap formats on a 16 bits window" title="Android bitmap formats" width="950" height="546" class="size-full wp-image-1221" /></a></p>
<p>To better compare the three formats, take a close look at the gray gradient on the left side of each screenshot:</p>
<p><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/12/bitmap16_comparison.png" alt="Comparison of Android&#039;s three bitmap formats when drawn on a 16 bits window" title="Comparison of bitmap format on a 16 bits window" width="708" height="540" class="aligncenter size-full wp-image-1233" /></p>
<p>You can see three types of artifacts in this image: banding, low precision and <a href="http://en.wikipedia.org/wiki/Dither">dithering</a>. The three bitmaps are loaded from the same resource and converted at load time using <a href="http://d.android.com/reference/android/graphics/BitmapFactory.Options.html">BitmapFactory.Options.inPreferredConfig</a>. The first bitmap, <code>ARGB_8888</code>, shows weird bands of colors, particularly visible in the gray gradient. You can also see that the bands have a slight green shift. This artifact appears when the 8 bits of precision are clamped to 5 or 6 bits of precision. <code>ARGB_4444</code> exhibits a similar behavior because of the upscale from 4 bits of precision to 5 or 6 bits. You can also notice a dithering pattern. Finally, the <code>RGB_565</code> shows a clear <a href="http://en.wikipedia.org/wiki/Dither">dithering</a> pattern.</p>
<p>These atrocities are unfortunately the default behavior on Android before 2.3. Fortunately, In most situations the user will not notice these artifacts. These artifact show mostly on subtle gradients or very specific types of images. There are also ways to hide these artifacts. For instance, opaque images that will be loaded in <code>RGB_565</code> can be pre-dithered in a tool like Adobe Photoshop, with more powerful and higher quality filters than the one used by Android. I would however not recommend this approach because it forces you to bake noise in your image, making it harder to reuse in the future. Another solution is apply dithering on 32 bits images. The following screenshot shows an <code>ARGB_8888</code> bitmap drawn on a 16 bits window with dithering enabled:</p>
<p><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/12/device16-dithered.png" alt="Dithering enabled to draw a 32 bits bitmap on a 16 bits window" title="Dithered 32 bits bitmap" width="520" height="840" class="aligncenter size-full wp-image-1239" /></p>
<p>The terrible banding artifact we saw earlier is now gone! The only difference is <a href="http://developer.android.com/reference/android/graphics/Paint.html#setDither(boolean)">enabling the dither flag on the paint</a> (it also works on <a href="http://developer.android.com/reference/android/graphics/drawable/Drawable.html#setDither(boolean)">drawables</a>.) Of course, because of its very nature, dithering is not perfect. A much better solution is simply to render 32 bits bitmaps on 32 bits surfaces, which Android 2.3 now does by default. The following screenshot shows the result of this new behavior:</p>
<p><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/12/device32.png" alt="Full color precision is achieved with 32 bits source and target" title="32 bits bitmap on a 32 bits window" width="520" height="840" class="aligncenter size-full wp-image-1245" /></p>
<p>The following image shows the difference between the previous approach, a dithered 32 bits bitmap drawn onto a 16 bits surface, and the new approach, a 32 bits bitmap drawn onto a 32 bits surface:</p>
<p><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/12/dithered_vs_32.png" alt="A comparison between dithered 32 bits bitmap on 16 bits surface and 32 bits bitmap on 32 bits surface" title="Dithering vs 32 bits" width="708" height="360" class="aligncenter size-full wp-image-1246" /></p>
<p>This image clearly shows that dithering introduces a very special type of noise used to trick your eye into seeing a smooth gradient. However, the 32 bits surface shows no artifact whatsoever and clearly provides the best quality. This is why we changed the behavior of Android 2.3 to loads bitmaps and windows in 32 bits by default.</p>
<p>You should also remember that choosing the appropriate bitmap format can lead to better runtime performance. For instance, drawing a 32 bits bitmap onto a 16 bits surface requires a specific conversion that costs CPU time. The following table compares the time taken to draw bitmaps in different formats, with or without dithering, on both 16 and 32 bits windows:</p>
<p><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/12/drawing_performance.png" alt="Performance comparison when drawing various bitmap formats onto 16 and 32 bits surfaces" title="Bitmaps drawing performance comparison" width="950" height="458" class="aligncenter size-full wp-image-1248" /></p>
<p>This simple performance test shows very clearly that using a compatible format (32 bits bitmap on a 32 bits window or 16 bits/565 bitmap on a 16 bits window) is the most efficient way to draw bitmaps. For this reason, you should always check the format of your bitmaps and windows and try to make them compatible with each other. You can choose a bitmap&#8217;s format when <a href="http://d.android.com/reference/android/graphics/Bitmap.html#createBitmap(int, int, android.graphics.Bitmap.Config)">creating an empty bitmap</a> or when <a href="http://d.android.com/reference/android/graphics/BitmapFactory.Options.html">decoding a resource or stream</a>. You can of course check the format of an existing bitmap using <a href="http://d.android.com/reference/android/graphics/Bitmap.html#getConfig()">Bitmap.getConfig()</a>. You can choose and query the format of the window by using <a href="http://d.android.com/reference/android/view/WindowManager.LayoutParams.html#format">getWindow().getAttributes().format</a> from your <code>onCreate()</code> method. You can also refer to <a href="/data/BitmapConfig.zip">this article&#8217;s example source code</a> to see how to choose a particular format.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2010/12/08/bitmap-quality-banding-and-dithering/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Gingerbread and 32 bits windows</title>
		<link>http://www.curious-creature.org/2010/12/04/gingerbread-and-32-bits-windows/</link>
		<comments>http://www.curious-creature.org/2010/12/04/gingerbread-and-32-bits-windows/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 07:54:44 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/?p=1205</guid>
		<description><![CDATA[I recently published the slides of two Android talks Chet Haase and I gave at Devoxx in November. One slide in particular got a lot of interest from various Android web sites: I would like to add a few things regarding this slide: Applications can use 32 bits windows today (transparent windows are 32 bits [...]]]></description>
			<content:encoded><![CDATA[<p>I recently <a href="http://www.curious-creature.org/2010/12/02/android-graphics-animations-and-tips-tricks/">published the slides of two Android talks</a> Chet Haase and I gave at Devoxx in November. One slide in particular got a lot of interest from various Android web sites:</p>
<p><a href="http://www.curious-creature.org/2010/12/04/gingerbread-and-32-bits-windows/gbwindows/" rel="attachment wp-att-1209"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/12/gbwindows.png" alt="Image quality in Gingerbread" title="Gingerbread and 32 bits" width="934" height="713" class="aligncenter size-full wp-image-1209" /></a><br />
<span id="more-1205"></span></p>
<p>I would like to add a few things regarding this slide:</p>
<ul>
<li>Applications can use 32 bits windows today (transparent windows are 32 bits for instance.)</li>
<li>Applications can force bitmaps to be loaded in 32 bits today.</li>
<li>Applications can prevent banding today (more about this in my next post.)</li>
<li>OpenGL windows remain 16 bits in Gingerbread for compatibility reasons. Some games assume this format and <em>should not</em>. But they do, and we don&#8217;t like breaking applications.</li>
<li>OpenGL applications can use 32 bits windows today.</li>
</ul>
<p>To sum up, Gingerbread does not add 32 bits support to the system, it&#8217;s always been there. Gingerbread simply enables 32 bits by default in more situations than before.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2010/12/04/gingerbread-and-32-bits-windows/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Android Graphics, Animations and Tips &amp; Tricks</title>
		<link>http://www.curious-creature.org/2010/12/02/android-graphics-animations-and-tips-tricks/</link>
		<comments>http://www.curious-creature.org/2010/12/02/android-graphics-animations-and-tips-tricks/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 01:27:39 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Conference]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/?p=1198</guid>
		<description><![CDATA[Chet Haase and I recently gave several presentations at Devoxx and the San Francisco Android user group. We&#8217;ve just posted the slides for two of these presentations: Android Graphics and Animations Android UI Development: Tips and Tricks These two presentations will teach you about development techniques we use every day on the Android team. The [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://graphics-geek.blogspot.com">Chet Haase</a> and I recently gave several presentations at <a href="http://www.devoxx.com">Devoxx</a> and the <a href="http://www.sfandroid.org/">San Francisco Android user group</a>. We&#8217;ve just posted the slides for two of these presentations:</p>
<ul>
<li><a href="https://sites.google.com/site/androidcontentfromchet/downloads/GraphicsandAnimations-Devoxx2010.pdf">Android Graphics and Animations</a></li>
<li><a href="https://sites.google.com/site/androidcontentfromchet/downloads/UITipsTricksTechniques.pdf">Android UI Development: Tips and Tricks</a></li>
</ul>
<p>These two presentations will teach you about development techniques we use every day on the Android team. The second one in particular shows what tools we use to track down performance issues. The videos of these two presentations are available on <a href="http://www.parleys.com">Parleys</a> for registered users and will be available for free later next year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2010/12/02/android-graphics-animations-and-tips-tricks/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>Android app: Retro Camera</title>
		<link>http://www.curious-creature.org/2010/09/11/android-app-retro-camera/</link>
		<comments>http://www.curious-creature.org/2010/09/11/android-app-retro-camera/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 07:12:17 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/?p=1155</guid>
		<description><![CDATA[As I mentioned a few days ago, I would like to present you Android applications I find interesting, useful, impressive or generally noteworthy. It&#8217;s not secret that I like photography, it should therefore not be surprising to some of you that I will start with a camera application. Retro Camera by Urbian follows a recent [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned <a href="http://www.curious-creature.org/2010/09/05/noteworthy-android-applications/">a few days ago</a>, I would like to present you Android applications I find interesting, useful, impressive or generally noteworthy. It&#8217;s <a href="http://www.flickr.com/photos/romainguy/">not secret</a> that I like <a href="http://picasaweb.google.com/romain.guy/Wallpapers#">photography</a>, it should therefore not be surprising to some of you that I will start with a camera application.</p>
<p><a href="http://www.urbian.biz/apps/retrocam/">Retro Camera</a> by Urbian follows a recent trend in photography. Modern cameras, including entry-level point and shoot cameras, produce gorgeous and near perfect photos. Unfortunately, these pictures are often boring. That&#8217;s why more and more photographers use processing techniques to make their photos appear as if they had been taken with crappy cameras, often referred to as &#8220;toy cameras.&#8221; <em>Retro Camera</em> lets you take crappy yet artsy/interesting photos right away and saves you time in Photoshop, Lightroom, Aperture&#8230; The application sports a very realistic user interface centered around film photography. When you launch it, you almost feel like you are actually using a camera, and not a cell phone:</p>
<p><a href="http://www.curious-creature.org/2010/09/11/android-app-retro-camera/retrocamera1/" rel="attachment wp-att-1156"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/09/retrocamera1.png" alt="Turn your phone into a camera" title="Retro Camera Home" width="840" height="520" class="aligncenter size-full wp-image-1156" /></a></p>
<p><span id="more-1155"></span></p>
<p>The tiny viewfinder is an especially nice touch and I appreciate the level at the bottom of the screen in the commercial version (replaced by ads in the free version.) <em>Retro Camera</em> is very easy to use, mostly because you do not have to fiddle with settings, knobs and sliders. Instead, the application offers you four virtual cameras, each with its own look and unique results. Of course, choosing a camera is as enjoyable as using them (don&#8217;t miss the very useful information panel of each camera):</p>
<p><a href="http://www.curious-creature.org/2010/09/11/android-app-retro-camera/retrocamera2/" rel="attachment wp-att-1159"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/09/retrocamera2.png" alt="Choose your favorite camera" title="Retro Camera Chooser" width="840" height="520" class="aligncenter size-full wp-image-1159" /></a></p>
<p>When you take a picture, it is sent to the dark room for processing and finally saved on your SD card. You can browse the photos using Android&#8217;s built-in Gallery application or simply do it from the application itself. The visuals are once again pleasing but the application will only show you photos taken with <em>Retro Camera</em> but you can share them in just one click to post them on Twitter, Facebook, send them by email, etc.</p>
<p><a href="http://www.curious-creature.org/2010/09/11/android-app-retro-camera/retrocamera3/" rel="attachment wp-att-1160"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/09/retrocamera3.png" alt="Photo gallery inside Retro Camera" title="Retro Camera Dark Room" width="840" height="520" class="aligncenter size-full wp-image-1160" /></a></p>
<p><em>Retro Camera</em> is a fun application that I like to use to take candid snapshots and give them a quirky look. It does not replace other camera applications but acts as a nice companion. I wish processing pictures was faster but overall <em>Retro Camera</em> is worth its price, especially if you enjoy visually rich and polished applications. Finally here is a photo of a real camera taken with one of <em>Retro Camera</em>&#8216;s virtual cameras:</p>
<p><a href="http://www.curious-creature.org/2010/09/11/android-app-retro-camera/camera/" rel="attachment wp-att-1161"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/09/camera.jpg" alt="" title="Retro Camera Pinhole" width="648" height="648" class="aligncenter size-full wp-image-1161" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2010/09/11/android-app-retro-camera/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Noteworthy Android applications</title>
		<link>http://www.curious-creature.org/2010/09/05/noteworthy-android-applications/</link>
		<comments>http://www.curious-creature.org/2010/09/05/noteworthy-android-applications/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 06:56:40 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/?p=1137</guid>
		<description><![CDATA[I recently asked my Twitter followers what their favorite Android application was. I got a lot of replies and I was happily surprised by the wide variety of apps mentioned. I often mention apps and games I like on Twitter but this little experiment convinced me it would be nice to do the same on [...]]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://twitter.com/romainguy/status/22958871665">recently asked</a> my <a href="http://twitter.com/romainguy">Twitter</a> followers what their favorite Android application was. I got a lot of replies and I was happily surprised by the wide variety of apps mentioned. I often mention apps and games I like on Twitter but this little experiment convinced me it would be nice to do the same on this blog and spend more time to talk about each app. Don&#8217;t expect full reviews or ratings, just thoughts about applications and games I enjoy using or I find useful. I will probably talk about some apps I found about thanks to your awesome replies to my Twitter question.</p>
<p>To open this new series of articles, I would like to start by showing you my home screen. I use an unmodified version of &#8220;stock&#8221; Android running on a NexusOne (and I won&#8217;t tell you which version I am running.)</p>
<p><a href="http://www.curious-creature.org/blog/wp-content/uploads/2010/09/home.png" rel="attachment"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/09/home_small2.png" alt="My Android home screen" title="Home" width="950" height="336" class="aligncenter size-full wp-image-1142" /></a></p>
<p>Among these various applications and games, the ones I use the most these days are Gmail, Talk and TweetDeck. Since I work at Google the first two are hardly surprising. I was using the official Twitter application until I saw so many people recommend TweetDeck yesterday. Aside from a few bugs and a couple of minor gripes I really like it so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2010/09/05/noteworthy-android-applications/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>ScrollView&#8217;s handy trick</title>
		<link>http://www.curious-creature.org/2010/08/15/scrollviews-handy-trick/</link>
		<comments>http://www.curious-creature.org/2010/08/15/scrollviews-handy-trick/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 04:12:10 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/?p=1086</guid>
		<description><![CDATA[ScrollView is one of Android’s most commonly used widget and is also one of the easiest to use. When something is too big to fit on screen, drop it inside a ScrollView and you’re done. You can’t even get it wrong since a ScrollView accepts only one child at a time. There is, however, one [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://d.android.com/reference/android/widget/ScrollView.html">ScrollView</a> is one of Android’s most commonly used widget and is also one of the easiest to use. When something is too big to fit on screen, drop it inside a <code>ScrollView</code> and you’re done. You can’t even get it wrong since a <code>ScrollView</code> accepts only one child at a time. There is, however, one use case a bit trickier to get right; unless you’ve carefully read the documentation.</p>
<p>Let’s imagine that your application needs to display a piece of text and a couple of buttons. The length of the text can vary and be longer or shorter than the screen. You want to put the text inside a scroll view and you want the buttons to scroll along with the text, probably to encourage the user to read the text before clicking any of the button. Depending on the length of the text, your application would look like one of the following screenshots:</p>
<p><span id="more-1086"></span></p>
<p>
<div style="text-align:center;"><a href="http://www.curious-creature.org/2010/08/15/scrollviews-handy-trick/scrollview1/" rel="attachment wp-att-1088" style="margin-right: 20px;"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/08/scrollview1.png" alt="ScrollView with short text" title="ScrollView with short text" width="320" height="480" class="size-full wp-image-1088" /></a><a href="http://www.curious-creature.org/2010/08/15/scrollviews-handy-trick/scrollview2/" rel="attachment wp-att-1089"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/08/scrollview2.png" alt="ScrollView with long text" title="ScrollView with long text" width="320" height="480" class="size-full wp-image-1089" /></a></div>
</p>
<p>In attempt to achieve this effect, I have seen several Android developers try to set the height of the view inside the scroll view to <code>fill_parent</code>. Doing so does not work and leads to the following result:</p>
<p><a href="http://www.curious-creature.org/2010/08/15/scrollviews-handy-trick/scrollview3/" rel="attachment wp-att-1096"><img src="http://www.curious-creature.org/blog/wp-content/uploads/2010/08/scrollview3.png" alt="ScrollView without fillViewport" title="ScrollView without fillViewport" width="320" height="480" class="aligncenter size-full wp-image-1096" /></a></p>
<p>To understand this result, you must remember that <code>android:layout_height=”fill_parent”</code> means “set the height to the height of the parent.” This is obviously not what you want when using a ScrollView. After all, the ScrollView would become useless if its content was always as tall as itself. To work around this, you need to use the ScrollView attribute called <code>android:fillViewport</code>. When set to true, this attribute causes the scroll view&#8217;s child to expand to the height of the <code>ScrollView</code> if needed. When the child is taller than the <code>ScrollView</code>, the attribute has no effect.</p>
<p>The XML I wrote to create the correct version of this example can be found below. In line 32, I’ve set the android:layout_weight of the TextView to 1.0. By doing so I am forcing the text to use the available empty space when it is shorter than the <code>ScrollView</code>. This can only work when <code>android:fillViewport=”true”</code> is set on the scroll view.</p>
<pre class="prettyprint lang-xml">
&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/scroller"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:fillViewport="true" &gt;
    &lt;LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"&gt;
        &lt;TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="6dip"
            android:paddingRight="6dip"
            android:paddingTop="6dip"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:text="Welcome to My Application" /&gt;

        &lt;View
            android:layout_width="fill_parent"
            android:layout_height="1dip"
            android:background="#ff106510"
            android:layout_marginLeft="6dip"
            android:layout_marginRight="6dip"
            android:layout_marginTop="6dip"
            android:layout_marginBottom="12dip" /&gt;

        &lt;TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1.0"

            android:paddingLeft="6dip"
            android:paddingRight="6dip"
            android:paddingBottom="6dip"

            android:text="@string/hello" /&gt;

        &lt;LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"

            android:background="@android:drawable/bottom_bar"
            android:gravity="center_vertical"&gt;
            &lt;Button
                android:layout_width="0dip"
                android:layout_weight="1.0"
                android:layout_height="wrap_content" 

                android:text="Accept" /&gt;
            &lt;Button
                android:layout_width="0dip"
                android:layout_weight="1.0"
                android:layout_height="wrap_content" 

                android:text="Refuse" /&gt;
        &lt;/LinearLayout&gt;
    &lt;/LinearLayout&gt;
&lt;/ScrollView&gt;
</pre>
<p>Last but not least, I realized while writing this that the documentation of ScrollView does not mention the fillViewport XML attribute, even though it shows the equivalent Java API, <a href="http://d.android.com/reference/android/widget/ScrollView.html#setFillViewport(boolean)">setFillViewport()</a>. This is a stupid mistake on my part that I <strike>will fix next week for a future release of Android. In the meantime, please accept my apologies :)</strike> just fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2010/08/15/scrollviews-handy-trick/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
	</channel>
</rss>

