The android activity provides 7 call backs which will be invoked based on the states of the activity For better undersatnding,The Activity A and Activity B with the all the call backs overridden. ActivityA : public class ActivityA extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.e("A-OnCreate", "Object Creation"); } public void next(View v) { Intent i = new Intent(this, Main2Activity.class); startActivity(i); } @Override protected void onStart() { super.onStart(); Log.e("A-onStart", "View is visible but will not be able to interact"); } ...
In this Blog ,I'm adding what I'm Learning as I trust sharing will sharpen our knowledge and I want others know that what I know.