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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:30:33+00:00 2026-06-12T11:30:33+00:00

In my app, I have a home screen with 4 buttons on it. If,

  • 0

In my app, I have a home screen with 4 buttons on it. If, for some obscure and unfathomable reason, a user were to click on more than one button at the same time, all of the target activities would open in the order they were clicked.

I have seen a couple of questions on here about something similar, but they don’t really answer the question. Hopefully, I don’t have to override multitouch methods to handle it.

How can I avoid this behaviour, thus preventing multiple click events at the same time?

  • 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-12T11:30:34+00:00Added an answer on June 12, 2026 at 11:30 am

    I had this exact issue in an application I developed. I found in testing that it was relatively easy to mash the screen with my hand and fire off onClick events for multiple buttons at the same time.

    I used the same OnClickListener for all the buttons on the activity. The code was something like this :

    protected final android.view.View.OnClickListener m_clickListener = new android.view.View.OnClickListener() {
    
        @Override
        public void onClick(View v) 
        {
            if(!m_buttonsEnabled)
            {
                return;
            }
    
            switch(v.getId())
            {
                case R.layout.button1:
                        m_buttonsEnabled = false;
                        final Intent i = new Intent(MainScreenActivity.this, Button1Activity.class);
                        startActivity(i);
                    }
                    break;
    
                case R.layout.button2:
                        m_buttonsEnabled = false;
                        final Intent i = new Intent(MainScreenActivity.this, Button2Activity.class);
                        startActivity(i);
                    }
                    break;
    
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small app that from the home screen has a few buttons,
I have an app that applies wallpaper to the home screen with images that
I have an app that uses webView. In the home screen of a website
I have an app that crashes if i press the home button, back button
my app have action bar on top of windows. Where are some buttons. Buttons
I have a main home screen in my app which I am eventually hoping
I'd like to have the home screen style for a section of my app,
I have splash screen in an application. When user is at home screen and
I have an app that allows you to create Home shortcuts to a specific
I have an iPhone app out there that calls home to my server every

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.