Q:

Is this a New Implementation in Android 4.0?

I have developed an app in android 4.0.3(Ice-cream Sandwich), i am using two activities to test the activity navigation.But i Observed a different behavior in Activity navigation.
I am calling Activity B From Activity A. In Activity B i am just calling the finish() method. So that we can see the Previous Activity A. It is exactly working as expected but the problem is for back navigation(Calling finish method or pressing back-key),it is calling onCreate() Method of Activity A instead of calling the onResume(). But in previous versions it is not behaving like this. Is this a new Implementation in android 4.0??
Here is the example which i implemented:
Activity_A:
public class Activity_A extends Activity {

    /** Called when the activity is first created. */
    static int count=0;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        TextView text=(TextView)findViewById(R.id.textcontent);
        text.setText("Activity 1 called:"+(++count)+" Times");
    }

    public void onClick(View v)
    {
        Intent intent=new Intent(this,Activity2.class);
        startActivityForResult(intent, 1);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    Log.d("onActivityResult", "Called with Code:"+resultCode);
    }

}

Activity_B:
public class Activity_B extends Activity {

      /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        TextView text=(TextView)findViewById(R.id.textcontent);
        text.setText("Activity 2");
    }

    public void onClick(View v)
    {
        setResult(1);
        finish();
    }
}

Please Check and let me know if i am doing any mistake.
Thanks,
Ram.

A:

I have the same problem!! Go to Settings/Development/ and uncheck  'Destroy Activities'

A:

This is from the Android Activity documentation (Link here):

If an activity in the foreground of the screen (at the top of the stack), it is active or running. 
If an activity has lost focus but is still visible (that is, a new non-full-sized or transparent activity has focus on top of your activity), it is paused. A paused activity is completely alive (it maintains all state and member information and remains attached to the window manager), but can be killed by the system in extreme low memory situations. 
If an activity is completely obscured by another activity, it is stopped. It still retains all state and member information, however, it is no longer visible to the user so its window is hidden and it will often be killed by the system when memory is needed elsewhere.
If an activity is paused or stopped, the system can drop the activity from memory by either asking it to finish, or simply killing its process. When it is displayed again to the user, it must be completely restarted and restored to its previous state.

Perhaps points 3 and 4 are relevant to you.

