How to create universal Splashscreen in android
<p>I am creating an android application in sdk2.1. i have put 3 different images in three type of drawable folders to support different resolution, also to support different screen sizes i have to create different layouts eg layout-small, layout-large etc. If I use fill_parent then my splash screen looks blurred in some case thats why i have used wrap_content. How to create universal Splashscreen in android which will work in all types of resolution and also in all types of screen size.</p>

<h2>MyApp.java</h2>

<pre><code>import android.app.Activity;
import android.os.Bundle;
import android.view.Window;

public class MyApp extends Activity{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        this.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
    }

}
</code></pre>

<p><strong>splash.xml</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:background="@drawable/spash_screen_image"&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p><strong>Manifest file</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.sunil.spinner"
      android:versionCode="1"
      android:versionName="1.0"&gt;


    &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
        &lt;activity android:name=".MyApp" android:screenOrientation="portrait"
                  android:label="@string/app_name"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;
                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;

    &lt;/application&gt;
&lt;/manifest&gt;
</code></pre>
