package com.games.andronoid;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class StartActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.start_layout);
			    
	    Utility.SetClickListener(findViewById(R.id.btnStart), mStartListener);
	    Utility.SetClickListener(findViewById(R.id.btnRules), mRulesListener);
	    Utility.SetClickListener(findViewById(R.id.btnSettings), mSettingsListener);
	    Utility.SetClickListener(findViewById(R.id.btnExit), mExitListener);
	}
	
	private void StartStageActivity(){
		Intent intent = new Intent(this, StageActivity.class);		
		startActivity(intent);		
	}
	
	private OnClickListener mStartListener = new OnClickListener() {
	    public void onClick(View v) {
	    	StartStageActivity();
	    }
	};
		
	private OnClickListener mRulesListener = new OnClickListener() {
	    public void onClick(View v) {
	      // do something when the button is clicked
	    }
	};
	
	private OnClickListener mSettingsListener = new OnClickListener() {
	    public void onClick(View v) {
	      // do something when the button is clicked
	    }
	};	
	
	private OnClickListener mExitListener = new OnClickListener() {
	    public void onClick(View v) {
	    	finish();
	    }
	};	
	
}

@@ -252,16 +252,43 @@
 ctivity 
+implements OnClickListener 
 %7B%0A%09@Over
@@ -492,30 +492,20 @@
 Start), 
-mStartListener
+this
 );%0A%09    
@@ -558,30 +558,20 @@
 Rules), 
-mRulesListener
+this
 );%0A%09    
@@ -627,33 +627,20 @@
 tings), 
-mSettingsListener
+this
 );%0A%09    
@@ -696,65 +696,153 @@
 t), 
-mExitListener);%0A%09%7D%0A%09%0A%09private void StartStageActivity()%7B%0A
+this);%0A%09%7D%0A%09%0A%09@Override%0A%09public void onClick(View v) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09switch(v.getId())%0A%09%09%7B%0A%09%09%09case R.id.btnStart:%0A%09%09%09%7B%0A%09%09
 %09%09In
@@ -896,16 +896,18 @@
 ass);%09%09%0A
+%09%09
 %09%09startA
@@ -930,613 +930,360 @@
 %09%09%0A%09
-%7D%0A%09%0A%09private OnClickListener mStartListener
+%09%09%09break;%0A%09%09%09%7D%0A%09%09%09case R.id.btnRules:%0A%09%09%09%7B%0A%09%09%09%09Intent intent
  = new 
-OnClickListener() %7B%0A%09    public void onClick(View v) %7B%0A%09    %09StartStageActivity();%0A%09    %7D%0A%09%7D
+Intent(this, RulesActivity.class);%09%09%0A%09%09%09%09startActivity(intent);%09%09%0A%09%09%09%09break
 ;%0A%09%09
+%09%7D
 %0A%09
-private OnClickListener mRulesListener = new OnClickListener() %7B%0A%09    public void onClick(View v) %7B%0A%09      // do something when the button is clicked%0A%09    %7D%0A%09%7D;%0A%09%0A%09private OnClickListener mSettingsListener
+%09%09case R.id.btnSettings:%0A%09%09%09%7B%0A%09%09%09%09Intent intent
  = new 
-OnClickListener() %7B%0A%09    public void onClick(View v) %7B%0A%09      // do something when the button is clicked%0A%09    %7D%0A%09%7D;%09%0A%09%0A%09private OnClickListener mExitListener = new OnClickListener() %7B%0A%09    public void onClick(View v) %7B%0A%09    %09finish();%0A%09    %7D%0A%09%7D;
+Intent(this, SettingsActivity.class);%09%09%0A%09%09%09%09startActivity(intent);%09%09%0A%09%09%09%09break;%0A%09%09%09%7D%0A%09%09%09case R.id.btnExit:%0A%09%09%09%7B%0A%09%09%09%09finish();%0A%09%09%09%09break;%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D
 %09%0A%09%0A

simplify StartActivity