I create views dynamically, and I handle their click events normally, like this :
myView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
v.setBackgroundColor(0xaaffffff);
}
});
But this code does not handle the onRelease
event, so the view remains with white background, after the click.
So how can I set the background to another value when the clicked state is over ?
Thanks in advance !
Edit:
OnTouchListener
does the exact same thing. I guess I need something like onReleaseListener
?