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