Execute something after call an Activity extends PreferenceActivity

69 Views Asked by At

When the user call a "Configuration" ítem of the app's menu and get back to the Main activity I want to execute something else ... I guess, I have to use startActivityForResult function correct?, but I have one question, the second Activity(PreferenceActivity / Configuration) does not has a "OK" or "CANCEL" button, so Where I have to put the finish() function to return to main activity ?, only the user get back to the main Activity when press back

1

There are 1 best solutions below

1
On BEST ANSWER

Override onBackPressed() nad use setResult(...) method in second Activity