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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:44:39+00:00 2026-06-07T18:44:39+00:00

I want the onClick method not only to create a new activity to the

  • 0

I want the onClick method not only to create a new activity to the new page, but also to trigger the end of the loop, so that if someone clicks the background of the splash screen, the new screen doesn’t reload after the loop stops.

Here is my code,

package clouds.clouds;

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

public class splash extends Activity {


@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.splash);
     Thread logotimer = new Thread() {


            @Override
            public void run(){
                try{
                    int logotimer = 0;
                    while(logotimer <5000) {
                        sleep(100);
                        logotimer = logotimer +100;

                    }
                    startActivity(new Intent("clouds.clouds.SPLASH"));
                } catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                finally{
                    finish();
                }

            }



        };
      logotimer.start();


}



    public void onClickz(View v){}
    public void speed2 (View v){

        startActivity(new Intent("clouds.clouds.BUTTONZ"));
    }



}

Any suggestions?

  • 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-07T18:44:42+00:00Added an answer on June 7, 2026 at 6:44 pm

    Call logotimer.interrupt() in your onClick() method. This should cause an InterruptedException in your thread which you should handle by doing nothing (or whatever else you want to do when you interrupt your thread)

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

Sidebar

Related Questions

I want to trigger a search in the onclick event of my input, but
I want to link the onclick event of the radio button to the new
I want that part 1 onclick div style changes and part 2 again on
I want to create a program which opens my file onClick by providing its
I have an onclick function that I want to add an anchor to the
I am using Ajax POST method to send data, but i am not able
I'm new to javascript, my problem is effectively: I have a php page that
This is not just for Google Chrome extension but also for JavaScript I am
I want to capture onClick events for the trackball on a HTC Hero. This
In the following code, I want to set Onclick Listeners on some elements of

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.