In Holo theme, as you click on a button it gets blue and shines for a moment. now I want the button remains at this appearance, and at the next click comes back to normal appearance. how to do that?
UPDATE: my code:
public class HomeActivity extends SherlockActivity {
org.holoeverywhere.widget.Button bt;
boolean isPressed = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.home_layout);
bt = (org.holoeverywhere.widget.Button) findViewById(android.R.id.button1);
bt.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_UP) {
if (!isPressed) {
isPressed = true;
} else {
isPressed = false;
}
bt.setPressed(isPressed);
}
return true;
}
});
}
}