Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.rana.activities;
- 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 Main extends Activity {
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
- Button b = (Button) findViewById(android.R.id.button1);
- b.setOnClickListener(new OnClickListener() {
- public void onClick(View v) {
- startActivity(new Intent(Main.this, Second.class));
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement