package ucr.a3x3;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;

public class Main extends Activity implements OnClickListener {
	ImageButton btn11, btn12, btn21, btn22;
	TextView txtMsg;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        txtMsg = (TextView) findViewById(R.id.txtMsg);
        
        btn11 = (ImageButton)findViewById(R.id.ImageButton11);
        btn12 = (ImageButton)findViewById(R.id.ImageButton12);
        btn21 = (ImageButton)findViewById(R.id.ImageButton21);
        btn22 = (ImageButton)findViewById(R.id.ImageButton22);
        
        btn11.setOnClickListener(this);
        btn12.setOnClickListener(this);
        btn21.setOnClickListener(this);
        btn22.setOnClickListener(this);
    }
	@Override
	public void onClick(View v) {
		if (v.getId()==btn11.getId()){
			txtMsg.setText("You clicked btn11");
		}
		else {
			txtMsg.setText("You DID NOT click btn11");
		}
	}
}