package com.example.activitydemo;
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 MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button mybutton = (Button)findViewById(R.id.button_next);
mybutton.setOnClickListener(new button_next());
}
class button_next implements OnClickListener {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent Intent = new Intent();
Intent.setClass(MainActivity.this, Activity_next.class);
MainActivity.this.startService(Intent);
}
}
}