onfocus not work for button
<pre><code>final View b= (Button) findViewById(R.id.find);
b.setOnFocusChangeListener(new  View.OnFocusChangeListener() {

            @Override
            public void onFocusChange(View v, boolean hasFocus) {
                // TODO Auto-generated method stub


                if(hasFocus==true)
            {
                Toast.makeText(user_interface.this, "onfocus", Toast.LENGTH_LONG).show();
            //  b.setBackgroundColor(R.color.gray);

            }
            else
            {

                Toast.makeText(user_interface.this, "lossfocus", Toast.LENGTH_LONG).show();


            }


            }
        });
</code></pre>
