Hi Steve..
I m a android beginner and started with the same book suggested
here...i.e. Android Essentials.
R u still continuing with same book or got a better one??

--

On Nov 24 2008, 6:25 pm, steve_macleod <[email protected]>
wrote:
> Hi,
> First post here, so hello everyone!
> I am working through the Android Essentials splash screen example
> application, and wondering if anyone can assist in identifying the
> type of notation that is used to create the new Thread below.
> Particularly code block after the new Thread() line. Is this an inner
> class or a inline method definition? I have never seen a Thread
> defined in this way before...
>
> Incidentally, I have been noticing that many of the examples in the
> Android Essentials book are outdated with the release of the SDK 1.0.
> Is it worth persevering with this book?
>
> public void onCreate(Bundle icicle)
>     {
>         super.onCreate(icicle);
>
>         m_bPaused = false;
>         m_bSplashActive = true;
>
>         //Very simple timer thread
>         Thread splashTimer = new Thread()
>         {
>                 public void run()
>                 {
>                         try
>                         {
>                                 //Wait loop
>                                 long ms = 0;
>                                 while(m_bSplashActive && ms < m_dwSplashTime)
>                                 {
>                                         sleep(100);
>                                         //Only advance the timer if we're 
> running.
>                                         if(!m_bPaused)
>                                                 ms += 100;
>                                 }
>                                 //Advance to the next screen.
>                                 startActivity(new Intent
> ("com.google.app.splashy.CLEARSPLASH"));
>                                 finish();
>                         }
>                         catch(Exception e)
>                         {
>                                 //Thread exception
>                                 System.out.println(e.toString());
>                         }
>                 }
>         };
>         splashTimer.start();
>
>         setContentView(R.layout.splash);
>
>         return;
>     }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to