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

The Archive Base Latest Questions

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

Im programming a little game where two Players have to click some Buttons it

  • 0

Im programming a little game where two Players have to click some Buttons it works pretty good if there is only one player, but when the other player is also playing his part of the game then the Buttons dont do anything.

How can i enable Multitouch so that 2 Buttons can get clicked at once ?

EDIT:
Here is some Code:

Layout XML

<ImageButton
    android:id="@+id/game1_player2"
    [...]
    android:background="@android:color/transparent"
    android:src="@drawable/player2_countdown_1" 
    android:onClick="player2method"/>

Iny My Java extends activity File:

public void player1method (View v)
{
    if(buttonzahl == player2_nextbutton)
    {
        Toast.makeText(getApplicationContext(), "player1 won", Toast.LENGTH_LONG).show();
    }
    else
    {
        Toast.makeText(getApplicationContext(), "player2 won", Toast.LENGTH_LONG).show();
    }
}

public void player2method(View v)
{
    if(buttonzahl == player2_nextbutton)
    {
        Toast.makeText(getApplicationContext(), "player2 won", Toast.LENGTH_LONG).show();
    }
    else
    {
        Toast.makeText(getApplicationContext(), "player1 won", Toast.LENGTH_LONG).show();
    }
}

If Player one clicks his buttons all is fine but if the other player also clicks no button is activated 🙁

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

    Multiple button presses for Android 2.x

    Click two buttons at the same time in Android

    so from the first posted link it seems like you need to override the touch events not just the onclick

    the second post talks about versions

    if neither of these help, please post some code

    few more links due to comments below

    Android multitouch: ACTION_UP not always called?

    Android – OnTouch Do Work

    getAction() gives only ACTION_DOWN

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

Sidebar

Related Questions

I have very little programming knowledge; only a fair bit in Visual Basic. How
I'm pretty new to programming and I'm creating a python game for my little
I'm programming a little game, and I set the lpfnWndProc to DefWindowProc and after
I have been programming in C# and Java for a little over a year
I have been doing a little reading on Flow Based Programming over the last
I have very little experience working with sockets and multithreaded programming so to learn
Warning: I have very little JavsScript experience. In my past programming experience, I usually
I try to realize a little game project to dive deeper into OO programming
I have a little programming experience with vb 6 and vb.net not much. Please
I'm programming a little Twitter Client just for fun. I have the tweet's text

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.