projects/syncpingpong/PingPongApp/app/src/main/java/io/v/pingpongapp/MainActivity.java
// Callback (from button press). Changes the text color between pinger and ponger.
Callback (from button press). Changes the text color between pinger and ponger.
Callback ( from button press ) . Changes the text color between pinger and ponger .
public void pingpongToggle(View view) {
        if (mTestThread == null) {
            Log.d(TAG, "Toggling peer ID!");
            mPeerID = 1 - mPeerID;
            setPreTestText();
            TextView tv = (TextView) findViewById(R.id.debug_text);
            tv.setTextColor(mPeerID == 0 ? Color.BLACK : Color.BLUE);
        }
    }
public void pingpongToggle ( View view ) { if ( mTestThread == null ) { Log . d ( TAG , "Toggling peer ID!" ) ; mPeerID = 1 - mPeerID ; setPreTestText ( ) ; TextView tv = ( TextView ) findViewById ( R . id . debug_text ) ; tv . setTextColor ( mPeerID == 0 ? Color . BLACK : Color . BLUE ) ; } }
Callback (from button press).
Callback ( from button press ) .