view.getId() not equals R.id.myBtn
<p>I want to determine which button was pressed and do something,
but can't find <code>R.id.myBtn's id</code>.
how can I do?</p>

<p><strong>Activity Code</strong></p>

<pre><code>private int id

public void myCode(View view) {
    id = view.getId();

    switch (id) {
        case R.id.myBtn1:
            testTest();
            break;
        case R.id.myBtn2:
            testTest();
            break;
    }
}

private void testTest() {
    if(id == R.id.myBtn1){  &lt;== it's not equals
        //something
    }else if(id == R.id.myBtn2){ &lt;== it's not equals
        //something
    }
    //something same for two button
}
</code></pre>