title: Libgdx: change ImageButton image on click
body: <p>In my game in Libgdx I want to change ImageButton image on click. I think this should be easy, but I have lost hours on this. :)</p>
  
  <pre><code>    public void show() {
          buttonSound = new ImageButton(skin.getDrawable("sound_off"));
          buttonSound.addListener(new onSoundListener());
  }
  
      class  onSoundListener extends InputListener {
  
          public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
  
              return true;
          }
  
          public void touchUp (InputEvent event, float x, float y, int pointer, int button) {
  
              buttonSound.setBackground(skin.getDrawable("btn_sound"));
  
          }
      }
  </code></pre>
  
  <p>This doesn't work. Can someone help me with this?</p>
  
  <p>Thanks</p>