Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Foo extends Activity {
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- Button button = new Button(this);
- button.setOnClickListener(new OnClickListener() {
- public void onClick(View view) {
- startActivity(new Intent(Foo.this, Bar.class));
- finish();
- }
- });
- setContentView(button);
- }
- protected void onDestroy() {
- super.onDestroy();
- Log.e("you're it", "isFinishing() == " + isFinishing());
- }
- }
- // ---
- public class Bar extends Activity {
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- TextView textView = new TextView(this);
- textView.setText("hello, world");
- setContentView(textView);
- }
- }
Add Comment
Please, Sign In to add comment