title: how to detect when a libgdx button is held down
body: <p>I'm trying to make an android game with libgdx, and am having problems with detecting if a button is being held down. I want to be able to detect when a button is being held down because i want to move my character when the button is down and stop him when it is up.</p>
  
  <p>I really just want the button to work like an arrow key on the keyboard. </p>
  
  <p>This is what i'm currently using:</p>
  
  <pre><code>    buttonRight.addListener(new ClickListener() {
          @Override
          public void clicked(InputEvent event, float x, float y) {
              levels.get(index - 1).getBlackPoint().moveRight();
          }
      });
  </code></pre>
  
  <p>i've tried other ways like using a change listener, but couldn't get it to work.</p>
  
  <p>I want to have four buttons on my gamescreen, left, right, up, down. Each button will move the character while the user is holding the button down. Once the button is released the character will stop moving until another one of the four buttons is held down.</p>