Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Opening an activity in Android without having to Reload it from scratch
- Intent intent = new Intent(this,SecondActivity.class);
- startActivityForResult(intent, RESULT_OK);
- public void onActivityResult(int requestCode, int resultCode, Intent data) {
- if (resultCode == RESULT_OK) {
- // When you are back from second Activity you are land here ..
- // do what ever you want to, without re Creating the this Activity
- }
- }
- Activity.this.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK));
Advertisement
Add Comment
Please, Sign In to add comment