I want to change the color back to default color.
If suppose I click on the Button; the color of button must change. And if I click on the same Button again... the color must set back to default.
How can I achieve this...
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (clicked) {
holder.b1.setBackgroundResource(R.drawable.like_icon_hover);
} else {
holder.b1.setBackgroundResource(R.drawable.like_icon);
}
clicked = false;
}
});