package com.appspot.thinkhea;
import java.util.Vector;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.GridView;
import com.appspot.thinkhea.model.MyDBHelper;
import com.appspot.thinkhea.model.Picture;
public class PanelSelectRandomFormat extends Activity {
private Vector<Picture> c;
private MyDBHelper db;
private GridView v;
private String tag = "PanelListSelectPicture";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setBackgroundDrawableResource(R.drawable.bg);
setTitle(R.string.desc_random_picture);
setContentView(R.layout.panel_random_team_format);
// Add Button Listener
Button b = (Button) findViewById(R.id.BtnGoBack);
b.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent myIntent = new Intent(PanelSelectRandomFormat.this,
PictureCounter.class);
PanelSelectRandomFormat.this.startActivity(myIntent);
}
});
((Button) findViewById(R.id.Btn01)).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//1v1
Bundle bundle = new Bundle();
bundle.putInt("PLAYERS", 2);
bundle.putInt("PLAYER_PER_TEAM", 1);
bundle.putInt("TEAM", 2);
Intent myIntent = new Intent(PanelSelectRandomFormat.this,
PanelRandomTeam.class);
myIntent.putExtras(bundle);
PanelSelectRandomFormat.this.startActivity(myIntent);
}
});
((Button) findViewById(R.id.Btn02)).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//2v2v2
Bundle bundle = new Bundle();
bundle.putInt("PLAYERS", 6);
bundle.putInt("PLAYER_PER_TEAM", 2);
bundle.putInt("TEAM", 3);
Intent myIntent = new Intent(PanelSelectRandomFormat.this,
PanelRandomTeam.class);
myIntent.putExtras(bundle);
PanelSelectRandomFormat.this.startActivity(myIntent);
}
});
((Button) findViewById(R.id.Btn03)).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//2v2
Bundle bundle = new Bundle();
bundle.putInt("PLAYERS", 4);
bundle.putInt("PLAYER_PER_TEAM", 2);
bundle.putInt("TEAM", 2);
Intent myIntent = new Intent(PanelSelectRandomFormat.this,
PanelRandomTeam.class);
myIntent.putExtras(bundle);
PanelSelectRandomFormat.this.startActivity(myIntent);
}
});
((Button) findViewById(R.id.Btn04)).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//3v3v3
Bundle bundle = new Bundle();
bundle.putInt("PLAYERS", 9);
bundle.putInt("PLAYER_PER_TEAM", 3);
bundle.putInt("TEAM", 3);
Intent myIntent = new Intent(PanelSelectRandomFormat.this,
PanelRandomTeam.class);
myIntent.putExtras(bundle);
PanelSelectRandomFormat.this.startActivity(myIntent);
}
});
((Button) findViewById(R.id.Btn05)).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//3v3
Bundle bundle = new Bundle();
bundle.putInt("PLAYERS", 6);
bundle.putInt("PLAYER_PER_TEAM", 3);
bundle.putInt("TEAM", 2);
Intent myIntent = new Intent(PanelSelectRandomFormat.this,
PanelRandomTeam.class);
myIntent.putExtras(bundle);
PanelSelectRandomFormat.this.startActivity(myIntent);
}
});
((Button) findViewById(R.id.Btn06)).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//3v3v4
Bundle bundle = new Bundle();
bundle.putInt("PLAYERS", 10);
bundle.putInt("PLAYER_PER_TEAM", 4);
bundle.putInt("TEAM", 3);
Intent myIntent = new Intent(PanelSelectRandomFormat.this,
PanelRandomTeam.class);
myIntent.putExtras(bundle);
PanelSelectRandomFormat.this.startActivity(myIntent);
}
});
((Button) findViewById(R.id.Btn07)).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//4v4
Bundle bundle = new Bundle();
bundle.putInt("PLAYERS", 8);
bundle.putInt("PLAYER_PER_TEAM", 4);
bundle.putInt("TEAM", 2);
Intent myIntent = new Intent(PanelSelectRandomFormat.this,
PanelRandomTeam.class);
myIntent.putExtras(bundle);
PanelSelectRandomFormat.this.startActivity(myIntent);
}
});
((Button) findViewById(R.id.Btn08)).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//3v4v4
Bundle bundle = new Bundle();
bundle.putInt("PLAYERS", 11);
bundle.putInt("PLAYER_PER_TEAM", 4);
bundle.putInt("TEAM", 2);
Intent myIntent = new Intent(PanelSelectRandomFormat.this,
PanelRandomTeam.class);
myIntent.putExtras(bundle);
PanelSelectRandomFormat.this.startActivity(myIntent);
}
});
((Button) findViewById(R.id.Btn09)).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//5v5
Bundle bundle = new Bundle();
bundle.putInt("PLAYERS", 10);
bundle.putInt("PLAYER_PER_TEAM", 5);
bundle.putInt("TEAM", 2);
Intent myIntent = new Intent(PanelSelectRandomFormat.this,
PanelRandomTeam.class);
myIntent.putExtras(bundle);
PanelSelectRandomFormat.this.startActivity(myIntent);
}
});
((Button) findViewById(R.id.Btn10)).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//4v4v4
Bundle bundle = new Bundle();
bundle.putInt("PLAYERS", 12);
bundle.putInt("PLAYER_PER_TEAM", 4);
bundle.putInt("TEAM", 3);
Intent myIntent = new Intent(PanelSelectRandomFormat.this,
PanelRandomTeam.class);
myIntent.putExtras(bundle);
PanelSelectRandomFormat.this.startActivity(myIntent);
}
});
}
}
|