I am modifying an open source application and want to add a splash screen to it, Can some one help me in it?
When the application starts a black screen appears for 2
Splash activity
public class LaunchScreen extends Activity {
public static final long TIME = 3000;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.logo);
Protocol.getInstance(this);
Thread welcomeThread = new Thread() {
@Override
public void run() {
try {
sleep(TIME);
} catch (Exception e) {
Log.e(getClass().getName(), e.toString());
} finally {
startActivity(new Intent(LaunchScreen.this,MainScreen.class));
finish();
}
}
};
welcomeThread.start();
}
}
logo.xml file:
in AndroidManifest :
activity android:name=".LaunchScreen">