Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6949415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:57:04+00:00 2026-05-27T13:57:04+00:00

i created a splash screen but when i launch my app the splash screen

  • 0

i created a splash screen but when i launch my app the splash screen does not show, just a black screen. however, after my timer for the splash screen ends, my menu comes up. in the graphical layout of my splashscreen.xml, the splash screen image show. but when run, it does not. all is normal except for my splash screen…

code for myMain.java:

package com.immrroj.firstapp;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class myMain extends Activity
{

@Override
protected void onCreate(Bundle savedInstanceState)
{
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.splashscreen);
    Thread splashtimer = new Thread()
    {
        @Override
        public void run()
        {
            try
            {
                int timer = 0;
                while (timer < 5000)
                {
                    sleep(100);
                    timer = timer + 100;
                }
                startActivity(new Intent("com.immrroj.firstapp.CLEARSCREEN"));
            } catch (InterruptedException e)
            {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

            finally
            {
                finish();
            }
        }
    };
    splashtimer.run();
}

@Override
protected void onDestroy()
{
    // TODO Auto-generated method stub
    super.onDestroy();
}

@Override
protected void onResume()
{
    // TODO Auto-generated method stub
    super.onResume();
}

@Override
protected void onStart()
{
    // TODO Auto-generated method stub
    super.onStart();
}

@Override
protected void onStop()
{
    // TODO Auto-generated method stub
    super.onStop();
}

}

code for myMenu.java

package com.immrroj.firstapp;

import android.app.Activity;
import android.os.Bundle;

public class myMenu extends Activity
{

@Override
protected void onCreate(Bundle savedInstanceState)
{
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
}

}

code for my main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" 
android:background="@drawable/mymenu">

<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="PRESS ME!!"
    android:textSize="19dp"
    android:textStyle="bold"
    android:width="200dp" android:layout_gravity="right"/>

 <Button
     android:id="@+id/button1"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:text="PRESS ME TOO!" 
     android:gravity="center" 
     android:textSize="19dp" 
     android:textStyle="bold" android:width="200dp" android:layout_gravity="right"/>

</LinearLayout>

code for my splashscreen.xml…. the image androidsplash is not showing

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<ImageView
    android:src="@drawable/androidsplash"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" 
    />

</LinearLayout>

code for my android manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.immrroj.firstapp"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="10" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <activity
        android:label="@string/app_name"
        android:name=".myMain" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
     <activity
        android:label="@string/app_name"
        android:name=".myMenu" >
        <intent-filter >
            <action android:name="com.immrroj.firstapp.CLEARSCREEN" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
</application>

</manifest>

please help..although i can continue, it is really bugging me….

UPDATE:
okay… i think its really hard to fix this without having hands on the code… so im posting this link so anybody can see the codes and tinker it… please help me… i wnat to learn android but im stuck in here…. download source code here, it’s safe i swear: https://skydrive.live.com/redir.aspx?cid=79ecba5b079a1b4c&resid=79ECBA5B079A1B4C!293&parid=79ECBA5B079A1B4C!113&authkey=!AK8-cta_tThQUms

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:57:05+00:00Added an answer on May 27, 2026 at 1:57 pm

    Got it.

    Downloaded your .rar and gave it a look. Turns out there was something wrong with your Thread. I don’t know exactly what, but it was causing the layout not to be properly loaded (probably because you made it sleep for 100 ms, then wake up, check a variable, and sleep again for 100 ms over and over).

    I changed your thread with the following code and now it works perfectly on my phone:

    @Override
        protected void onCreate(Bundle savedInstanceState) {
            // TODO Auto-generated method stub
            super.onCreate(savedInstanceState);
            setContentView(R.layout.splashscreen);
    
            Thread timer = new Thread() {
                // Thread to show the splash screen, then launch the main screen
                @Override
                public void run() {
                    try {
                        sleep(2500); // set this to how long you want to wait before
                                        // showing the main screen
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    } finally {
                        Intent mainScreen = new Intent(
                                "com.immrroj.firstapp.CLEARSCREEN");
                        startActivity(mainScreen);
                    }
                }
            };
            timer.start();
        }
    

    You can leave all the other onStart, onPause etc methods out, you’re not using those in a splash screen anyway.

    I uploaded the edited code here: Download

    Good luck with your app!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have created a splash screen but I am not sure how to
According to Apple's guide line, an iPhone app's launch image/splash screen should be a
I'm trying to create a splash screen of sorts for my Android App but
I am attempting to create a splash screen to show up while my app
Has anyone created a custom Silverlight Splash screen to replace the blue balls circular
Hey all, I've created a loading/splash screen that loads at the beginning of my
I want a splash screen to show while the application is loading. I have
I have a question that I have a splash screen in my android app
I'm trying to do a splash screen using CF.NET but I'm lost in the
Wanna create a custom splash screen for the iPhone, but Im asking for opinion

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.