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

  • Home
  • SEARCH
  • 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 7876587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:11:24+00:00 2026-06-03T03:11:24+00:00

when I start my Activity, I notice a short delay. I click on my

  • 0

when I start my Activity, I notice a short delay. I click on my app icon and the home screen stays on the screen for about 1-1.5 sec before my activity is shown.

My activity’s onCreate method takes about 800ms to finish.

I’ve also noticed that setting android:screenOrientation="landscape" also adds a noticeable delay, even when I use a test Activity with an empty layout.

Is there a way to get rid of this delay, or at least show a black screen while the UI is loading?

Edited: see code for test activity below. In my real activity there is a bunch of other loading including GUI elements and engine logic, sound, etc. The real issue is that the delay is visible even using this small test activity.


Code for test activity:

public class TestActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Set full screen mode and disable
        // the keyguard (lockscreen)
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN  
                             | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD 
                             | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
                             | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

        setContentView(R.layout.main);
    }
}

Layout XML:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:keepScreenOn="true"  >
</FrameLayout>

Manifest:

<activity
    android:name=".TestActivity"
    android:configChanges="orientation|keyboardHidden"
    android:label="@string/app_name"
    android:screenOrientation="landscape"
    android:windowSoftInputMode="stateAlwaysHidden|adjustPan" >
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>
  • 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-06-03T03:11:25+00:00Added an answer on June 3, 2026 at 3:11 am

    you could set the default activity to a near blank activity that does nothing more than show a background and start your real activity.. like a splash screen

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

Sidebar

Related Questions

The activity works fine until the home key is pressed. Then when the app
When I run my code, Unable to start activity ComponentInfo: android.database.sqlite.SQLiteException: near /: syntax
I want to start an activity when the service is ran for the first
I know that we can start new activity with the steps as follows :
I have this situation where i have to start an activity from my mainActivity.
What's the best practice to start a new activity when AsynTask is finished, I
I have an application and every new created activity will start an async task
In an given Android activity, I would like to start a new activity for
I try to start action with service (or activity) from an url. (with params)
I would like to start a broadcast receiver from an activity. I have a

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.