org.hermit.android.core
Class SplashActivity

java.lang.Object
  extended by Activity
      extended by org.hermit.android.core.SplashActivity

public class SplashActivity
extends Activity

An activity which displays a splash screen and then returns to the calling activity.


Field Summary
static java.lang.String EXTRAS_IMAGE_ID
          Extras key for the image resource ID.
static java.lang.String EXTRAS_TIME_ID
          Extras key for the splash screen display time.
 
Constructor Summary
SplashActivity()
           
 
Method Summary
static void launch(Context context, int image, long time)
          Launch a splash screen displaying the given drawable.
 void onCreate(Bundle icicle)
          Called when the activity is starting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTRAS_IMAGE_ID

public static final java.lang.String EXTRAS_IMAGE_ID
Extras key for the image resource ID. The extras data named by this key is an int which specifies the image to display.

See Also:
Constant Field Values

EXTRAS_TIME_ID

public static final java.lang.String EXTRAS_TIME_ID
Extras key for the splash screen display time. The extras data named by this key is the time in ms for which the splash screen should be displayed.

See Also:
Constant Field Values
Constructor Detail

SplashActivity

public SplashActivity()
Method Detail

onCreate

public void onCreate(Bundle icicle)
Called when the activity is starting. This is where most initialization should go: calling setContentView(int) to inflate the activity's UI, etc.

Parameters:
icicle - Saved application state, if any.

launch

public static void launch(Context context,
                          int image,
                          long time)
Launch a splash screen displaying the given drawable.

Parameters:
context - Application context we're running in.
image - Resource ID of the image to display.
time - Time in ms for which the splash screen should be visible.