Free Source Code Android Splash Screen
FREE SOURCE CODE - How to implement Android Splash Screen in your application. Tutorial about implementing android splash screen in your application will your help to make your app very nice. This is the full code for the splash screen. I will keep on adding stuff to it as I explain and also learn. So it isn't the complete thing.
In this tutorial we are going to learn how to implement splash screen in your android application. you will learn how to implement a Splash Screen in your Android application.
Splash.java
Splash.xml
In this tutorial we are going to learn how to implement splash screen in your android application. you will learn how to implement a Splash Screen in your Android application.
Splash.java
package alfarobi.android;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;
public class Splash extends Activity {
private static String TAG = Splash.class.getName();
private static long SLEEP_TIME = 5; // Sleep for some time
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE); // Removes title bar
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN); // Removes notification bar
setContentView(R.layout.splash);
// Start timer and launch main activity
IntentLauncher launcher = new IntentLauncher();
launcher.start();
}
private class IntentLauncher extends Thread {
@Override
/**
* Project by Effand Nozh | wa: +6285649905055 | effands@gmail.com
* Sleep for some time and than start new activity...
*/
public void run() {
try {
// Sleeping
Thread.sleep(SLEEP_TIME * 500);
} catch (Exception e) {
Log.e(TAG, e.getMessage());
}
// Start main activity
Intent intent = new Intent(Splash.this, MainActivity.class);
Splash.this.startActivity(intent);
Splash.this.finish();
}
}
}
Splash.xml
<?xml version="1.0" encoding="utf-8"?>Happy Creating a Splash Screen
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#020202"
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:background="@drawable/logorgm"
tools:ignore="ContentDescription" />
</LinearLayout>
android splash screen
android news and tutorials
best android mobile apps