public void onViewClicked(View view) { switch (view.getId()) { case R.id.bt1: img1.setColorFilter(getResources().getColor(R.color.color3)); break; case R.id.bt2: img1.setColorFilter(getResources().getColor(R.color.color1)); break; case R.id.bt3: img1.setColorFilter(getResources().getColor(R.color.color2)); break; } }