Back to project page android-training-tutorial.
The source code is released under:
MIT License
If you think the Android project android-training-tutorial listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package im.ene.zaidlservicesample; //from www . j a v a 2 s . c o m import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class MainActivity extends Activity { Button btnNext; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); overridePendingTransition(R.anim.anim_in, R.anim.anim_out); setContentView(R.layout.first); System.out.println("----main activity---onCreate---"); btnNext = (Button) findViewById(R.id.button1); btnNext.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Intent ob = new Intent(MainActivity.this, Second.class); startActivity(ob); } }); } @Override protected void onStart() { // TODO Auto-generated method stub super.onStart(); System.out.println("----main activity---onStart---"); overridePendingTransition(R.anim.anim_in, R.anim.anim_out); } }