title: libGDX autoresizing image button
body: <p>i want a list with image buttons to be displayed in my libGDX app.
  The idea is that the image has a size of lets say 400x100 pixels.
  I need the list to be able to display the images stretched to width of the screen - the height of the image should be resized to keep the aspect ratio.</p>
  
  <p>But everytime i try to do this the image won't get resized properly.
  The image is not stretched when smaller then screen width or the padding get's bad or the aspect ration gets wrong.</p>
  
  <p>Could you suggest a way to do this, i'm struggling to find any solution..
  The actor must be Button a button.. (need "checked"/selected functionality)</p>
  
  <p>I tried to do something like this:</p>
  
  <pre><code>Table table = new Table();
  table.setFillParent(true);
  
  Texture t1 = ... snip ...
  Texture t2 = ... snip ...
  ImageButton i1 = new ImageButton( new TextureRegionDrawable(new TextureRegion(t1));
  ImageButton i2 = new ImageButton( new TextureRegionDrawable(new TextureRegion(t2));
  
  i1.getImageCell().expandX().fillX();
  i2.getImageCell().expandX().fillX();
  
  table.add(i1).expandX().fillX();
  table.row();
  table.add(i2).expandX().fillX();
  
  getStage().add(table);    
  </code></pre>