how to create object of activity and call its life cycle method like a normal java class
.
for example,
In Android
class ABC extends Activity{}
new ABC().onCreate(null);
how to create object of activity and call its life cycle method like a normal java class
.
for example,
In Android
class ABC extends Activity{}
new ABC().onCreate(null);
If you are looking to start a new activity (like from your main activity to ABC activity), you do it this way
Intent i = new intent(this, ABC.class);
startActivity(i);
if you looking for passing data, use putExtra() method with the intent. if your data is much larger, you can always use SharedPreferences or SqlLite database, depending on your need. Hope it helps