Variable is always true even when assigned later?
<p>I am getting this error and I really can't understand why. The code:</p>

<pre><code>    b1.setOnClickListener(new View.OnClickListener() {

        public void onClick(View arg0) {
            // TODO Auto-generated method stub
            boolean b = true;
            if(b == true){
                tv1.setText("true");
                b2.setEnabled(false);
                b = false;

            } else

                if(b == false){
                b2.setEnabled(true);
                b = true;
                tv1.setText("false");
</code></pre>

<p>As you can see I'm trying to make when a button is clicked it will check if variable "b" is true or false and then it should do the following code. But it doesn't! It only does the actions for the "if b == true". Can you help me?</p>
