title: Change screen libgdx, not working
body: <p>just wondered how you chang screens in libgdx (screen implements screen). I tried and set it up to change screen on screentap on phone , or when space is pressed in pc, but the game doesn't respond in any way at all. Any ideas?</p>
  
  <p>Game class:</p>
  
  <pre><code>package com.kapres.bounce;
  
  import com.badlogic.gdx.Game;
  
  /**
  * Created by KnutAndre on 12/20/2016.
  */
  
  public class BounceGame extends Game {
  @Override
   public void create() {
      showMenuScreen();
   }
  
   public void showMenuScreen(){
      setScreen(new MenuScreen(this));
   }
  
   public void showGameScreen(){
      setScreen(new GameScreen());
   }
  }
  </code></pre>
  
  <p>Menu Screen:</p>
  
  <pre><code>package com.kapres.bounce;
  
  import com.badlogic.gdx.Gdx;
  import com.badlogic.gdx.Input;
  import com.badlogic.gdx.InputAdapter;
  import com.badlogic.gdx.Screen;
  import com.badlogic.gdx.graphics.Color;
  import com.badlogic.gdx.graphics.GL20;
  import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
  import com.badlogic.gdx.utils.viewport.FitViewport;
  
  /**
  * Created by KnutAndre on 12/26/2016.
  */
  
  public class MenuScreen extends InputAdapter implements Screen {
  
  BounceGame game;
  
  ShapeRenderer renderer;
  FitViewport menuViewport;
  
  public MenuScreen(BounceGame game) {this.game = game;}
  
  @Override
  public void show() {
      renderer = new ShapeRenderer();
      menuViewport = new FitViewport(Constants.WORLD_WIDTH,   Constants.WORLD_HEIGTH);
      renderer.setAutoShapeType(true);
  }
  
  @Override
  public void render(float delta) {
      menuViewport.apply(true);
  
      Gdx.gl.glClearColor(Constants.BACKGROUND_COLOR.r, Constants.BACKGROUND_COLOR.g, Constants.BACKGROUND_COLOR.b, 1);
      Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
  
      renderer.setProjectionMatrix(menuViewport.getCamera().combined);
  
      renderer.begin();
      renderer.set(ShapeRenderer.ShapeType.Filled);
      renderer.setColor(Color.GREEN);
      renderer.circle(Constants.WORLD_WIDTH/2, Constants.WORLD_HEIGTH/2, Constants.START_BUTTON_RADIUS, 50);
      renderer.end();
  }
  
  @Override
  
  public void resize(int width, int height) {
      menuViewport.update(width, height, true);
     // menuViewport.getCamera().position.set(Constants.WORLD_WIDTH/2, Constants.WORLD_HEIGTH/2);
  }
  
  @Override
  public void pause() {
  
  }
  
  @Override
  public void resume() {
  
  }
  
  @Override
  public void hide() {
      renderer.dispose();
  }
  
  @Override
  public void dispose() {
      renderer.dispose();
  }
  
  @Override
  public boolean keyDown(int keyCode) {
      if (keyCode == Input.Keys.SPACE){
          game.showGameScreen();
      }
      return true;
  }
  
  @Override
  public boolean touchDown(int screenX, int screenY, int pointer, int button){
      game.showGameScreen();
      return true;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Game Screen:</p>
  
  <pre><code>package com.kapres.bounce;
  
  import com.badlogic.gdx.Gdx;
  import com.badlogic.gdx.Screen;
  import com.badlogic.gdx.graphics.GL20;
  import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
  import com.badlogic.gdx.utils.viewport.FitViewport;
  
  
  /**
  * Created by KnutAndre on 12/20/2016.
  */
  
  public class GameScreen implements Screen{
  
  ShapeRenderer renderer;
  FitViewport gameViewport;
  Ball ball;
  
  @Override
  public void show() {
      renderer = new ShapeRenderer();
      renderer.setAutoShapeType(true);
      gameViewport = new FitViewport(Constants.WORLD_WIDTH, Constants.WORLD_HEIGTH);
      ball = new Ball(gameViewport);
      Gdx.input.setInputProcessor(ball);
  }
  
  @Override
  public void render(float delta) {
      gameViewport.apply(true);
  
      Gdx.gl.glClearColor(Constants.BACKGROUND_COLOR.r, Constants.BACKGROUND_COLOR.g, Constants.BACKGROUND_COLOR.b, 1);
      Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
  
      renderer.setProjectionMatrix(gameViewport.getCamera().combined);
  
      renderer.begin();
      ball.render(renderer, delta);
      renderer.end();
  }
  
  @Override
  public void resize(int width, int height) {
      gameViewport.update(width, height, true);
      ball.init();
  }
  
  @Override
  public void pause() {
  
  }
  
  @Override
  public void resume() {
  
  }
  
  @Override
  public void hide() {
  
  }
  
  @Override
  public void dispose() {
      renderer.dispose();
  }
  }
  </code></pre>