Hi all, I am currently working on my first app. Essentially, I am using and Android device to operate as a clients sending packets over a socket to a wireless router running White Russian acting as the server. I have essentially a UI thread and a client thread.
On create, I initialize a group of variables as false, and in response to a button click the booleans are set true. However, on release of the buttons I would like to reset the respective booleans to false. I have looked on the android developer site for something along the lines of how I implemented the button click, but unfortunately I was unable to find anything. Any suggestions?
one of the button lines from main.xml:
<Button android:text="right" android:id="@+id/right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" android
nClick="moveLeft"></Button>
and my moveLeft() method from the main activty:
}
Thanks in advance!
On create, I initialize a group of variables as false, and in response to a button click the booleans are set true. However, on release of the buttons I would like to reset the respective booleans to false. I have looked on the android developer site for something along the lines of how I implemented the button click, but unfortunately I was unable to find anything. Any suggestions?
one of the button lines from main.xml:
<Button android:text="right" android:id="@+id/right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" android
nClick="moveLeft"></Button>and my moveLeft() method from the main activty:
public
void moveLeft(View v){
myTCPClient.left = true;
myTCPClient.left = true;
}
Thanks in advance!