package
com.xiaochun91103;
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 {
/** Called when the activity is first created. */
private
Button fadeIn, zoomOut;
@Override
public
void
onCreate(Bundle savedInstanceState) {
super
.onCreate(savedInstanceState);
setContentView(R.layout.main);
fadeIn = (Button) findViewById(R.id.fadein);
fadeIn.setOnClickListener(
new
OnClickListener() {
@Override
public
void
onClick(View v) {
startActivity(
new
Intent(MainActivity.
this
, ShowActivity.
class
));
overridePendingTransition(R.anim.fade, R.anim.hold);
}
});
zoomOut = (Button) findViewById(R.id.zoomout);
zoomOut.setOnClickListener(
new
OnClickListener() {
@Override
public
void
onClick(View v) {
startActivity(
new
Intent(MainActivity.
this
, ShowActivity.
class
));
overridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit);
}
});
}
}