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 6995949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:05:42+00:00 2026-05-27T20:05:42+00:00

I am modifying an open source application and want to add a splash screen

  • 0

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 to 3 seconds and then the application appears….
In the code the activity main.xml is started, I have read some forums that the splash.xml file should be created and with the help of threads splash activity and main activity should be executed parallel. Is it the right approach…?

#

public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        instance = this;
        setContentView(R.layout.main);

#

Would it not be possible that I modify main.xml and put the image (splash) in main.xml so that it appears from there?

  • 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-27T20:05:43+00:00Added an answer on May 27, 2026 at 8:05 pm

    Use class SplashScreen as under

    public class Splashscreen extends Activity {
    
    private static final int SPLASH_DISPLAY_TIME = 3000; /* 3 seconds */
    
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
    
        new Handler().postDelayed(new Runnable() {
    
            public void run() {
    
                Intent mainIntent = new Intent(Splashscreen.this,
                        MainActivity.class);
                Splashscreen.this.startActivity(mainIntent);
    
                Splashscreen.this.finish();
                overridePendingTransition(R.anim.mainfadein,
                        R.anim.splashfadeout);
            }
        }, SPLASH_DISPLAY_TIME);
    }
    

    }

    **Add mainfadein.xml & splashfadeout.xml in res->anim folder

    mainfadein.xml**

        <?xml version="1.0" encoding="utf-8"?>
    <alpha xmlns:android="http://schemas.android.com/apk/res/android"
            android:interpolator="@android:anim/accelerate_interpolator"
            android:fromAlpha="0.0"
            android:toAlpha="1.0"
            android:duration="1000">
    </alpha>
    

    splashfadeout.xml

    <?xml version="1.0" encoding="utf-8"?>
    <alpha xmlns:android="http://schemas.android.com/apk/res/android"
            android:interpolator="@android:anim/decelerate_interpolator"
            android:zAdjustment="top"
            android:fromAlpha="1.0"
            android:toAlpha="0.0"
            android:duration="1000" >
    </alpha>
    

    and add splash.xml just Add an ImageView and set its background as screen & add image of urchoice in layout

    And make Splashscreen class as Launcher and make all other class as HOME in manifest file

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

Sidebar

Related Questions

I'm doing some contribution to an open source library, but I'm having trouble modifying
I'm modifying an open-source GUI (written in c) to add a new menu item
I am modifying an open source program to create a generic filter for a
I am modifying a CMake file of an existing open source project written in
I'm modifying an open-source project that's stored in an SVN repo. Since my changes
I'm modifying a mature CGI application written in Perl and the question of content
I am modifying some code and came across a declaration that I am having
I am modifying a Nant build script to run some unit tests. I have
We all know that modifying a .NET web application's web.config file restarts the app
I'm new and just developing on J2EE. I am modifying an existing application (an

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.