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 :(