Advertisement
rana

Main.java

Nov 2nd, 2011
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. package com.rana.activities;
  2.  
  3. import android.app.Activity;
  4. import android.content.Intent;
  5. import android.os.Bundle;
  6. import android.view.View;
  7. import android.view.View.OnClickListener;
  8. import android.widget.Button;
  9.  
  10. public class Main extends Activity {
  11.     /** Called when the activity is first created. */
  12.     @Override
  13.     public void onCreate(Bundle savedInstanceState) {
  14.         super.onCreate(savedInstanceState);
  15.         setContentView(R.layout.main);
  16.        
  17.         Button b = (Button) findViewById(android.R.id.button1);
  18.         b.setOnClickListener(new OnClickListener() {
  19.            
  20.             public void onClick(View v) {
  21.                 startActivity(new Intent(Main.this, Second.class));
  22.             }
  23.         });
  24.     }
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement