Android用のアプリを設計しようとしています。
ボタン1をタップするxと1に設定され、ボタン2の場合は1に設定されますy。
次に、これらの変数を if ステートメントで使用します。
int z;
int y;
int w;
final Button m = (Button) findViewById(R.id.button1);
final Button m1 = (Button) findViewById(R.id.button4);
final Button m2 = (Button) findViewById(R.id.button5);
m.setOnTouchListener(new OnTouchListener() {
    @Override
    public boolean onTouch(View arg0, MotionEvent arg1) {
        // some code here
        z == 1;
        return false;
    }
});
m1.setOnTouchListener(new OnTouchListener() {
    @Override
    public boolean onTouch(View arg0, MotionEvent arg1) {
        // some code here
        z == 1;
        return false;
    }
});
m2.setOnTouchListener(new OnTouchListener() {
    @Override
    public boolean onTouch(View arg0, MotionEvent arg1) {
        // some code here
        z == 1;
        return false;
    }
});
if (x == 1 & y == 1 & z == 1) {
    finish();
    //some code here
}
しかし、「if」内部ブロックには決して到達しません。どうすれば修正できますか?
ありがとう。