using a generic class in android
<p>Hi i am new to android.. 
i have the following code..</p>

<pre><code>package squash.trainer;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class SquashTrainerActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
         // Button btn_start = (Button) findViewById(R.id.btn_start);
        //btn_start.setOnClickListener(new View.OnClickListener() {
        //      public void onClick(View v) {
        //      setContentView(R.layout.selecttopmenu);

        //      }});          
}
public boolean onCreateOptionsMenu(Menu menu) { 
    MenuInflater inflater = getMenuInflater(); 
    inflater. inflate(R.menu.mainmenu, menu); 
    return true; 
 }
public boolean onOptionsItemSelected(MenuItem item) { 

        switch (item. getItemId() ) { 

        case R. id.btn1: 
            BugsSequence();
                        return true; 
        case R. id.btn2: 

                        return true; 
        case R. id.btn3: 

                        return true; 
        case R. id.btn4: 

                        return true; 
                    default: 
                return super. onOptionsItemSelected(item) ; 
        }    
}
private void BugsSequence() {
    // TODO Auto-generated method stub
}
}
</code></pre>

<p><strong>for each case i want to use the a class to load the new layout and logic...</strong></p>

<p><strong>currently i have a test class called Bugssequence</strong> </p>

<hr>

<pre><code>package squash.trainer;
import android.os.Bundle;
import android.app.Activity;
//import android.view.View;
//import android.widget.Button;

public class BugsSequence extends Activity {
        @Override
public void onCreate(Bundle savedInstanceState) {
        //super.onCreate(savedInstanceState);
        setContentView(R.layout.selecttopmenu);   
}
/**
 * @param args
 */
public static void main(String[] args) {
    //
}
</code></pre>

<p>}</p>

<p><strong>How can i get it load the new layout.. when i press on button 1.. it does nothing..</strong>
or is there a better way to load 4 different layouts /class(logic) one for each of the menus. Should i even be creating new activities for each screen / layout ?</p>

<p>Thanks you for your assistance...</p>
