How to show an image in full screen?

I want to make a splash screen in my application, for that i need to know how to show an image in full screen. This could me made by XML or Java code ? And how?
For now i just made this:

public class SplashScreen extends Activity {

    private static final int STOPSPLASH = 0;

    private static final long SPLASHTIME = 5000;

    private Handler splashHandler = new Handler() {
    public void handleMessage(Message msg) {
    switch (msg.what) {
    case STOPSPLASH:
    //remove SplashScreen from view
    Intent intent = new Intent(SplashScreen.this, jetpack.class);


    public void onCreate(Bundle savedInstanceState) {
    Message msg = new Message();
    msg.what = STOPSPLASH;
    splashHandler.sendMessageDelayed(msg, SPLASHTIME);

How can be this splash_screen.xml ?
Thank you for your help.

  • Service vs IntentService
  • Installing APK from email attachment
  • Published Android apk gives error “Package file was not signed correctly”
  • jquery ajax GET request executing twice
  • Detect my app's own android:versionCode at run time
  • How can I hide the zoom control in an Android webview?
  • Android widget different portrait and landscape orientation
  • android custom EditText UI
  • Using the colors for the new Material design theme in Android
  • Obfuscate private fields using ProGuard
  • android illegal exception when dialog is showing
  • Android ndk-build ignoring APP_ABI := x86
  • 3 Solutions collect form web for “How to show an image in full screen?”

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android=""
    android:layout_height="fill_parent" >
    <ImageView android:layout_width="fill_parent"
        android:src="@drawable/image" />

    and in the code add


    before setContentView(R.layout.splash_screen);

    The best way to show a full screen splash activity is by putting this line in your manifest under activity tag


    You can use other themes as well


                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />

    For Latest Api Lollipop and above

    <style name="Theme.AppCompat.Light.NoActionBar.FullScreen" parent="@style/Theme.AppCompat.Light">
    <item name="windowNoTitle">true</item>
    <item name="windowActionBar">false</item>
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowContentOverlay">@null</item>

    Define this theme for the splash activity and provide it in manifest


    If R.layout.splash_screen included an image with height and width set to fill_parent or match_parent (depending on version). It will fill the screen

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.