title: Remove Image of ImageButton and set new Image
body: <p>ImageButton's background is not getting changed
  Everything is working counter is getting changed it was working till it was onTouchListener, I changed to onclickListener then changing of background stopped, how should I change background in onClickListener</p>
  
  <p>I tried <a href="https://stackoverflow.com/a/11835365/6648201">https://stackoverflow.com/a/11835365/6648201</a> but it's not helping me</p>
  
  <pre><code>    final ImageButton user_btn_like = (ImageButton) view.findViewById(R.id.user_btn_like);
  
      user_btn_like.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              if(presslikecount ==0) {
                  user_btn_like.setPressed(true);
                  presslikecount++;
                  pressdislikecount = 0;
  
                  user_btn_like.setBackgroundResource(R.drawable.ic_user_like_red);
                  user_btn_dislike.setPressed(false);
                  user_btn_dislike.setBackgroundResource(R.drawable.ic_user_dislike_black);
                  like.setText(String.valueOf(presslikecount));
                  dislike.setText(String.valueOf(pressdislikecount));
              }
              else
                  presslikecount--;
                  user_btn_like.setPressed(false);
                  user_btn_like.setBackgroundResource(R.drawable.ic_user_like_black);
                 like.setText(String.valueOf(presslikecount));
          }
      });
  </code></pre>