package agile.hustler.activities;
import agile.hustler.activities.R;
import agile.hustler.activities.R.id;
import agile.hustler.activities.R.layout;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
public class NewGame extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.newscreen);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
findViewById(R.id.new_tank).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Bundle b = new Bundle();
b.putInt("class", 1);
Intent intent = new Intent(NewGame.this, NameScreen.class);
intent.putExtras(b);
startActivity(intent);
finish();
System.gc();
}
});
findViewById(R.id.new_caster).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Bundle b = new Bundle();
b.putInt("class", 2);
Intent intent = new Intent(NewGame.this, NameScreen.class);
intent.putExtras(b);
startActivity(intent);
finish();
System.gc();
}
});
findViewById(R.id.new_dps).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Bundle b = new Bundle();
b.putInt("class", 3);
Intent intent = new Intent(NewGame.this, NameScreen.class);
intent.putExtras(b);
startActivity(intent);
finish();
System.gc();
}
});
findViewById(R.id.ButtonBack).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
startActivity(new Intent(NewGame.this, StartScreen.class));
finish();
System.gc();
}
});
}
}
|