Simple Splash Screen
<p>I am trying to follow a simple splash screen example I found.  But I cannot get it to even compile.</p>

<p>First this is the source of the example:</p>

<p><a href="http://www.anddev.org/simple_splash_screen-t811.html" rel="nofollow">http://www.anddev.org/simple_splash_screen-t811.html</a></p>

<p>I am trying to put in into a form that would work for my program.</p>

<p>I created a class in Eclipse for this splash screen</p>

<p>com.ePN.ePNMobileAndroid.ePNSplash</p>

<p>Here is my current main.xml file.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical" android:layout_width="fill_parent"
     android:layout_height="fill_parent"&gt;
     &lt;ImageView android:id="@+id/splashscreen" android:layout_width="wrap_content"
          android:layout_height="fill_parent" android:src="@drawable/com.ePN.ePNMobileAndroid.splash"
          android:layout_gravity="center"/&gt;
     &lt;TextView android:layout_width="fill_parent"
          android:layout_height="wrap_content" android:text="Hello World, splash"/&gt;
&lt;/LinearLayout&gt; 
</code></pre>

<p>And the class itself</p>

<pre><code>package com.ePN.ePNMobileAndroid;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.ImageView; 

public class ePNSplash extends Activity {
    private static final int STOPSPLASH = 0;
    //time in milliseconds
    private static final long SPLASHTIME = 3000;

    private ImageView splash;

    //handler for splash screen
    private Handler splashHandler = new Handler() {
         /* (non-Javadoc)
          * @see android.os.Handler#handleMessage(android.os.Message)
          */
         @Override
         public void handleMessage(Message msg) {
              switch (msg.what) {
              case STOPSPLASH:
                   //remove SplashScreen from view
                  splash.setVisibility(View.GONE);
                   break;
              }
              super.handleMessage(msg);
         }
    };

   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle icicle) {
       super.onCreate(icicle);
       setContentView(R.layout.main);
              splash = (ImageView) findViewById(R.id.splashscreen);
              Message msg = new Message();
              msg.what = STOPSPLASH;
              splashHandler.sendMessageDelayed(msg, SPLASHTIME);
   } 
}
</code></pre>

<p>The XML has an error saying:</p>

<p>"no resource found that matches the given name (at src with value '@drawable/com.ePN.ePNMobileAndroid.splash')"</p>

<p>I have tried every way I can think to modify the android:src but it will not work.</p>

<p>The class is in error because it cannot resolve r_id.splashscreen in the find by id line.</p>

<p>This is all greek to me, how should this trivial xml and/or java file be modified to make this work?</p>

<p>Thanx</p>

<p>Julian</p>
