<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Playing with graphics in Android &#8211; Part I</title>
	<atom:link href="http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html</link>
	<description>Rapid android development from Berlin</description>
	<lastBuildDate>Thu, 09 Sep 2010 14:31:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Dan Norcott</title>
		<link>http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html/comment-page-1#comment-1350</link>
		<dc:creator>Dan Norcott</dc:creator>
		<pubDate>Sat, 04 Sep 2010 15:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=147#comment-1350</guid>
		<description>Thanks - just what I needed to get me started</description>
		<content:encoded><![CDATA[<p>Thanks &#8211; just what I needed to get me started</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Pingry</title>
		<link>http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html/comment-page-1#comment-1311</link>
		<dc:creator>Rick Pingry</dc:creator>
		<pubDate>Fri, 13 Aug 2010 14:49:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=147#comment-1311</guid>
		<description>Thanks for all your great advice and tutorials, very much appreciated.
I am trying to wrap my head around the Activity-View-Thread model.
Specifically, I want to make a game menu that will allow you to choose levels, then if the user presses the back key while in a level, they could perhaps resume the level without starting over.  I also want it to make it play nice with the rest of the DROID OS (like when you press Home and then return to your app).  Any ideas on a menu screen architecture?  I know how to fire off new Activities with a button click, I am just not sure about the back button from the level and the resume from the main menu.

After many crashes of the emulator, I am starting to realize that I cannot depend on keeping things around in the Activity, View, or Thread (Canvas?).  Even turning the DROID sideways starts things over again right?  I am thinking that on certain callbacks I need to dump everything and then start over.  Is that right?  I do get some of the Activity life-cycle mentioned in the Android dev docs, but I am not completely sure if I have it all down to handle every case.  Any advice? 

I guess I need to keep the game state somewhere it will not be trashed.  If I make the game so that it only runs one time in the manifest, can I hold on to stuff as static variables of the Main Activity class?  I have read recently that I need to be careful of keeping implicit back-references to the Activity class around as statics, because it calls a leak.  I think that happens most easily through the context.  I think I can get an Application context right?  Am I heading in the right direction?  Any Advice?

Thanks Again
-- Rick</description>
		<content:encoded><![CDATA[<p>Thanks for all your great advice and tutorials, very much appreciated.<br />
I am trying to wrap my head around the Activity-View-Thread model.<br />
Specifically, I want to make a game menu that will allow you to choose levels, then if the user presses the back key while in a level, they could perhaps resume the level without starting over.  I also want it to make it play nice with the rest of the DROID OS (like when you press Home and then return to your app).  Any ideas on a menu screen architecture?  I know how to fire off new Activities with a button click, I am just not sure about the back button from the level and the resume from the main menu.</p>
<p>After many crashes of the emulator, I am starting to realize that I cannot depend on keeping things around in the Activity, View, or Thread (Canvas?).  Even turning the DROID sideways starts things over again right?  I am thinking that on certain callbacks I need to dump everything and then start over.  Is that right?  I do get some of the Activity life-cycle mentioned in the Android dev docs, but I am not completely sure if I have it all down to handle every case.  Any advice? </p>
<p>I guess I need to keep the game state somewhere it will not be trashed.  If I make the game so that it only runs one time in the manifest, can I hold on to stuff as static variables of the Main Activity class?  I have read recently that I need to be careful of keeping implicit back-references to the Activity class around as statics, because it calls a leak.  I think that happens most easily through the context.  I think I can get an Application context right?  Am I heading in the right direction?  Any Advice?</p>
<p>Thanks Again<br />
&#8211; Rick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: faisal</title>
		<link>http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html/comment-page-1#comment-1268</link>
		<dc:creator>faisal</dc:creator>
		<pubDate>Tue, 27 Jul 2010 12:41:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=147#comment-1268</guid>
		<description>Hi Martin, 

Just an update might be useful to other ppl viewing this, I found out what was causing the antialiasing the get messed.  I wasnt drawing a background colour.  I wasnt aware I needed to do this but hey ho.

Thanks
Faisal

P.S. wicked site keep up the good work!</description>
		<content:encoded><![CDATA[<p>Hi Martin, </p>
<p>Just an update might be useful to other ppl viewing this, I found out what was causing the antialiasing the get messed.  I wasnt drawing a background colour.  I wasnt aware I needed to do this but hey ho.</p>
<p>Thanks<br />
Faisal</p>
<p>P.S. wicked site keep up the good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: faisal</title>
		<link>http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html/comment-page-1#comment-1267</link>
		<dc:creator>faisal</dc:creator>
		<pubDate>Tue, 27 Jul 2010 12:16:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=147#comment-1267</guid>
		<description>Hi Martin,

I was wondering if you could give me a bit of help.  I created a simple application which contains a surface view and a thread and it simply draws a rounded rectangle within the on draw method.  the problem I have is that the graphic being drawn on my device/emulator still has jagged edges even though I have set antialias to true.

Any ideas?

thanks
Faisal</description>
		<content:encoded><![CDATA[<p>Hi Martin,</p>
<p>I was wondering if you could give me a bit of help.  I created a simple application which contains a surface view and a thread and it simply draws a rounded rectangle within the on draw method.  the problem I have is that the graphic being drawn on my device/emulator still has jagged edges even though I have set antialias to true.</p>
<p>Any ideas?</p>
<p>thanks<br />
Faisal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Overv</title>
		<link>http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html/comment-page-1#comment-1243</link>
		<dc:creator>Overv</dc:creator>
		<pubDate>Thu, 22 Jul 2010 18:03:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=147#comment-1243</guid>
		<description>Great tutorial, but isn&#039;t it a better idea to only call decodeResource once? It seemed to be quite a bit faster in my tests.</description>
		<content:encoded><![CDATA[<p>Great tutorial, but isn&#8217;t it a better idea to only call decodeResource once? It seemed to be quite a bit faster in my tests.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flycomte</title>
		<link>http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html/comment-page-1#comment-1149</link>
		<dc:creator>Flycomte</dc:creator>
		<pubDate>Sat, 12 Jun 2010 06:16:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=147#comment-1149</guid>
		<description>thank u for your tutorial.</description>
		<content:encoded><![CDATA[<p>thank u for your tutorial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html/comment-page-1#comment-1134</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Thu, 03 Jun 2010 17:42:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=147#comment-1134</guid>
		<description>You should use your own SurfaceView within an XML definition. You can read here more about your own Components: http://developer.android.com/guide/topics/ui/custom-components.html#modifying</description>
		<content:encoded><![CDATA[<p>You should use your own SurfaceView within an XML definition. You can read here more about your own Components: <a href="http://developer.android.com/guide/topics/ui/custom-components.html#modifying" rel="nofollow">http://developer.android.com/guide/topics/ui/custom-components.html#modifying</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaideep</title>
		<link>http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html/comment-page-1#comment-1133</link>
		<dc:creator>Jaideep</dc:creator>
		<pubDate>Thu, 03 Jun 2010 17:32:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=147#comment-1133</guid>
		<description>Thanks for the quick and easy tutorial.  I have a requirement to draw a small panel (smaller than the total screen size) more like a EditView that supports mutliple lines where I can draw using the Touch events.  
Any help/guidance ??</description>
		<content:encoded><![CDATA[<p>Thanks for the quick and easy tutorial.  I have a requirement to draw a small panel (smaller than the total screen size) more like a EditView that supports mutliple lines where I can draw using the Touch events.<br />
Any help/guidance ??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dw</title>
		<link>http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html/comment-page-1#comment-1126</link>
		<dc:creator>dw</dc:creator>
		<pubDate>Mon, 31 May 2010 19:31:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=147#comment-1126</guid>
		<description>Thank you! This is a great example for learning how to use Canvas. Looking forward to reading part II.</description>
		<content:encoded><![CDATA[<p>Thank you! This is a great example for learning how to use Canvas. Looking forward to reading part II.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html/comment-page-1#comment-1110</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Wed, 26 May 2010 19:56:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=147#comment-1110</guid>
		<description>You can create a SurfaceView as an overlay over your SlidingDrawer, but you keep in mind to make the SurfaceView transparent. Try that</description>
		<content:encoded><![CDATA[<p>You can create a SurfaceView as an overlay over your SlidingDrawer, but you keep in mind to make the SurfaceView transparent. Try that</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->