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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:44:09+00:00 2026-05-23T13:44:09+00:00

How can I implement a simple splash screen on program startup? I am copying

  • 0

How can I implement a simple “splash screen” on program startup? I am copying a SQLite DB and it can be a bit of a long process that is not UI “friendly” .

I would prefer not to use “java code”.

TIA

  • 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-23T13:44:10+00:00Added an answer on May 23, 2026 at 1:44 pm

    I recently solved this problem in the following way.

    In the main activity I passed a parameter via the intent to set the number of milliseconds for which the splash screen would remain visible.

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
    
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
    
            Intent i=new Intent();
            i.SetClass(this, typeof (Splash));
            i.PutExtra("Milliseconds", 3000);
            StartActivity(i);
        }
    

    Then, in the second activity which I named “Splash” I retrieved the value and set a second thread to end the activity when the time had elapsed.

    [Activity(Label = "Daraize Tech")]
    public class Splash : Activity
    {
        private int _milliseconds;
        private DateTime _dt;
    
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            _milliseconds = Intent.GetIntExtra("Milliseconds", 1000);
            SetContentView(Resource.Layout.Splash);
            _dt=DateTime.Now.AddMilliseconds(_milliseconds);
         }
    
        public override void OnAttachedToWindow()
        {
            base.OnAttachedToWindow();
    
            new Thread(new ThreadStart(() =>
                                        {
                                        while (DateTime.Now < _dt)
                                            Thread.Sleep(10);
                                        RunOnUiThread( Finish );                                                   
                                        }
                )).Start();
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am to program a simple shell in linux that can implement various stuffs
I am trying to implement simple program in Java that will be used to
I'm trying to implement a simple shell program that supports multiple piping. For now
I am to program a simple shell in C for my project that can
i would like to implement a thread framework using simple c and timers....can anyone
I know that classes can implement various special methods, such as __iter__ , __setitem__
I'm wondering how you can implement a program similar to tail -f in C/C++,
I'm looking for suggestions on possible IPC mechanisms that I can implement in my
I try to implement simple server on python based on HTTPServer. How can i
I need to implement simple function that is called from multiple threads. The logic

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.