<?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: How to: Create a splash screen</title>
	<atom:link href="http://www.droidnova.com/how-to-create-a-splash-screen,561.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.droidnova.com/how-to-create-a-splash-screen,561.html</link>
	<description>Rapid android development from Berlin</description>
	<lastBuildDate>Mon, 06 Sep 2010 15:34:12 +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: Coder</title>
		<link>http://www.droidnova.com/how-to-create-a-splash-screen,561.html/comment-page-1#comment-1314</link>
		<dc:creator>Coder</dc:creator>
		<pubDate>Wed, 18 Aug 2010 19:55:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=561#comment-1314</guid>
		<description>Thanks for posting this, very helpful. Thanks for the source code!</description>
		<content:encoded><![CDATA[<p>Thanks for posting this, very helpful. Thanks for the source code!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: New to developing (internship) having some problems/ignorance related - Android Forums</title>
		<link>http://www.droidnova.com/how-to-create-a-splash-screen,561.html/comment-page-1#comment-1242</link>
		<dc:creator>New to developing (internship) having some problems/ignorance related - Android Forums</dc:creator>
		<pubDate>Thu, 22 Jul 2010 16:49:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=561#comment-1242</guid>
		<description>[...] How to: Create a splash screen on Android Development [...]</description>
		<content:encoded><![CDATA[<p>[...] How to: Create a splash screen on Android Development [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Honcho</title>
		<link>http://www.droidnova.com/how-to-create-a-splash-screen,561.html/comment-page-1#comment-1207</link>
		<dc:creator>Mike Honcho</dc:creator>
		<pubDate>Tue, 06 Jul 2010 02:14:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=561#comment-1207</guid>
		<description>@Alex: I know this is late but if anyone else has this problem, you need to capture the onConfigChange events....

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
      super.onConfigurationChanged(newConfig);      
    }</description>
		<content:encoded><![CDATA[<p>@Alex: I know this is late but if anyone else has this problem, you need to capture the onConfigChange events&#8230;.</p>
<p>    @Override<br />
    public void onConfigurationChanged(Configuration newConfig) {<br />
      super.onConfigurationChanged(newConfig);<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: m2k</title>
		<link>http://www.droidnova.com/how-to-create-a-splash-screen,561.html/comment-page-1#comment-1203</link>
		<dc:creator>m2k</dc:creator>
		<pubDate>Sun, 04 Jul 2010 15:02:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=561#comment-1203</guid>
		<description>just also wanted to thank you alot!!

(such full name email questions are jjuuuust rubbish ^^)</description>
		<content:encoded><![CDATA[<p>just also wanted to thank you alot!!</p>
<p>(such full name email questions are jjuuuust rubbish ^^)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias</title>
		<link>http://www.droidnova.com/how-to-create-a-splash-screen,561.html/comment-page-1#comment-1146</link>
		<dc:creator>Matthias</dc:creator>
		<pubDate>Fri, 11 Jun 2010 07:08:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=561#comment-1146</guid>
		<description>That code is wrong. _active is non-volatile and you don&#039;t use any other synchronization primitives like mutexes, so the code may misbehave (visibility of current value of _active is NOT guaranteed, since two threads are reading the variable concurrently).

Change the _active variable to volatile or use synchronize().</description>
		<content:encoded><![CDATA[<p>That code is wrong. _active is non-volatile and you don&#8217;t use any other synchronization primitives like mutexes, so the code may misbehave (visibility of current value of _active is NOT guaranteed, since two threads are reading the variable concurrently).</p>
<p>Change the _active variable to volatile or use synchronize().</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.droidnova.com/how-to-create-a-splash-screen,561.html/comment-page-1#comment-1111</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 27 May 2010 00:47:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=561#comment-1111</guid>
		<description>The article is very informative, thank you.
Here is a problem though. The splash screen is shown when the device changes orientation even if the program is being active, the system just restarts it.
How can I show the splash only when the user actually launches the porgram?</description>
		<content:encoded><![CDATA[<p>The article is very informative, thank you.<br />
Here is a problem though. The splash screen is shown when the device changes orientation even if the program is being active, the system just restarts it.<br />
How can I show the splash only when the user actually launches the porgram?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mat</title>
		<link>http://www.droidnova.com/how-to-create-a-splash-screen,561.html/comment-page-1#comment-1098</link>
		<dc:creator>Mat</dc:creator>
		<pubDate>Fri, 21 May 2010 23:12:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=561#comment-1098</guid>
		<description>Hi, thanks a lot for this article !

Like André said, it&#039;s possible to use an Handler instead of a Thread.
I came to this solution because Thread.stop() is deprecated and the code is much simpler.
 
There is no problem to handle user input to stop the splash screen with this technique, you just have to call  the _yourHandler.removeCallback(_yourRunnable) in your onTouchEvent() method to ensure that the runnable will not be launched by the handler.

Here is the code :

&lt;code&gt;
public class SplashScreen extends Activity
{

	protected int _splashTime = 3000;
	protected Handler _exitHandler = null;
	protected Runnable _exitRunnable = null;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.splash);

		// Runnable exiting the splash screen and launching the menu
		_exitRunnable = new Runnable() {
			public void run()
			{
				exitSplash();
			}
		};

		// Run the exitRunnable in in _splashTime ms
		_exitHandler = new Handler();
		_exitHandler.postDelayed(_exitRunnable, _splashTime);
	}

	@Override
	public boolean onTouchEvent(MotionEvent event)
	{
		if (event.getAction() == MotionEvent.ACTION_DOWN)
		{
			// Remove the exitRunnable callback from the handler queue
			_exitHandler.removeCallbacks(_exitRunnable);
			// Run the exit code manually
			exitSplash();
		}
		return true;
	}

	private void exitSplash()
	{
		finish();
		startActivity(new Intent(&quot;com.example.MyApp&quot;));
	}
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi, thanks a lot for this article !</p>
<p>Like André said, it&#8217;s possible to use an Handler instead of a Thread.<br />
I came to this solution because Thread.stop() is deprecated and the code is much simpler.</p>
<p>There is no problem to handle user input to stop the splash screen with this technique, you just have to call  the _yourHandler.removeCallback(_yourRunnable) in your onTouchEvent() method to ensure that the runnable will not be launched by the handler.</p>
<p>Here is the code :</p>
<p><code><br />
public class SplashScreen extends Activity<br />
{</p>
<p>	protected int _splashTime = 3000;<br />
	protected Handler _exitHandler = null;<br />
	protected Runnable _exitRunnable = null;</p>
<p>	/** Called when the activity is first created. */<br />
	@Override<br />
	public void onCreate(Bundle savedInstanceState)<br />
	{<br />
		super.onCreate(savedInstanceState);<br />
		setContentView(R.layout.splash);</p>
<p>		// Runnable exiting the splash screen and launching the menu<br />
		_exitRunnable = new Runnable() {<br />
			public void run()<br />
			{<br />
				exitSplash();<br />
			}<br />
		};</p>
<p>		// Run the exitRunnable in in _splashTime ms<br />
		_exitHandler = new Handler();<br />
		_exitHandler.postDelayed(_exitRunnable, _splashTime);<br />
	}</p>
<p>	@Override<br />
	public boolean onTouchEvent(MotionEvent event)<br />
	{<br />
		if (event.getAction() == MotionEvent.ACTION_DOWN)<br />
		{<br />
			// Remove the exitRunnable callback from the handler queue<br />
			_exitHandler.removeCallbacks(_exitRunnable);<br />
			// Run the exit code manually<br />
			exitSplash();<br />
		}<br />
		return true;<br />
	}</p>
<p>	private void exitSplash()<br />
	{<br />
		finish();<br />
		startActivity(new Intent("com.example.MyApp"));<br />
	}<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jBilvo</title>
		<link>http://www.droidnova.com/how-to-create-a-splash-screen,561.html/comment-page-1#comment-1040</link>
		<dc:creator>jBilvo</dc:creator>
		<pubDate>Fri, 16 Apr 2010 16:13:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=561#comment-1040</guid>
		<description>Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention How to: Create a splash screen on Android Development -- Topsy.com</title>
		<link>http://www.droidnova.com/how-to-create-a-splash-screen,561.html/comment-page-1#comment-996</link>
		<dc:creator>Tweets that mention How to: Create a splash screen on Android Development -- Topsy.com</dc:creator>
		<pubDate>Fri, 02 Apr 2010 21:06:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=561#comment-996</guid>
		<description>[...] This post was mentioned on Twitter by Daniël. Daniël said: Android How to: Create a splash screen http://bit.ly/cKFehQ #AndroidDev [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Daniël. Daniël said: Android How to: Create a splash screen <a href="http://bit.ly/cKFehQ" rel="nofollow">http://bit.ly/cKFehQ</a> #AndroidDev [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Niraj</title>
		<link>http://www.droidnova.com/how-to-create-a-splash-screen,561.html/comment-page-1#comment-977</link>
		<dc:creator>Niraj</dc:creator>
		<pubDate>Sat, 27 Mar 2010 07:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=561#comment-977</guid>
		<description>Great tutorial. Helped me out in creating a splash page for my first Android app.</description>
		<content:encoded><![CDATA[<p>Great tutorial. Helped me out in creating a splash page for my first Android app.</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! -->