I want to display a logo for few seconds before application starts and menu is visible. I want also to use some when it disappears. Should I create a new activity? Can I set it
package com.karan.android.video;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class splash extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Thread splashThread = new Thread()
{
@Override
public void run()
{
try {
int waited = 0;
while (waited < 3000)
{
sleep(100);
waited += 100;
}
} catch (InterruptedException e)
{
// do nothing
} finally
{
finish();
Intent i = new Intent(splash.this,video.class);
startActivity(i);
}
}
};
splashThread.start();
}
}
Xml file: