Passing of values from a class extending in Activity to class extending in SurfaceView
<p>I want to pass some values from my Game extends Activity to Screen extends SurfaceView using getters, but I always got 0 and I don't know what's happening.</p>

<p>This is my code for Game class:</p>

<pre><code>public class Game extends Activity{

Screen screen;
Map map;
int mouseEvent;
private int mouseX;
private int mouseY;
private Bundle extra;
private int tileRows;
private int tileColumns;
private int minBlocks;
private int maxBlocks;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    getWindow().setFlags(LayoutParams.FLAG_FULLSCREEN, LayoutParams.FLAG_FULLSCREEN);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    extra = getIntent().getExtras();
    tileRows = extra.getInt("numRow");
    tileColumns = extra.getInt("numColumn");
    minBlocks = extra.getInt("numMinBlock");
    maxBlocks = extra.getInt("numMaxBlock");
    setContentView(R.layout.game);
}

public boolean onTouchEvent(MotionEvent event){
    mouseEvent = event.getAction();
    mouseX = (int) event.getX();
    mouseY = (int) event.getY();
    return super.onTouchEvent(event);
}

public int getMouseX() {
    return mouseX;
}

public int getMouseY() {
    return mouseY;
}

public int getTileRows() {
    return tileRows;
}

public int getTileColumns() {
    return tileColumns;
}

public int getMinBlocks() {
    return minBlocks;
}

public int getMaxBlocks() {
    return maxBlocks;
}

public void setMouseX(int mouseX) {
    this.mouseX = mouseX;
}

public void setMouseY(int mouseY) {
    this.mouseY = mouseY;
}
</code></pre>

<p>}</p>

<p>And this is my code for Screen class:</p>

<pre><code>public class Screen extends SurfaceView implements Callback
</code></pre>

<p>{</p>

<pre><code>private Map map;
private SurfaceHolder holder;
private GameThread gamethread;
private Penguin penguin;
private boolean isSurfaceCreated;
private Bitmap tiles, character;
private int tileRows, tileColumns, minBlocks, maxBlocks;

public Screen(Context context, AttributeSet attb) {
    super(context, attb);
    tiles = BitmapFactory.decodeResource(getResources(), R.drawable.tile_sprites);
    character = BitmapFactory.decodeResource(getResources(), R.drawable.penguin_sprite);
    this.getHolder().addCallback(this);
    this.tileRows = new Game().getTileRows();
    this.tileColumns = new Game().getTileColumns();
    this.minBlocks = new Game().getMinBlocks();
    this.maxBlocks = new Game().getMaxBlocks();
}
</code></pre>

<p>}</p>

<p>Your help will be deeply appreciated :)</p>
