Skip to main content


Showing posts from September, 2010

Activity in android

Activity is important ui unit of android application.

To start an activity from another, you have to use an intent by sending the new activity class as parameter.

Intent i = new Intent(this, NewActivity.class);

Next you call startActivity method


You can pass extra data to the new actiivity by using putExtra method.

i.putExtra( "Title",mTitle);

In the new activity, you can extract this information using getExtra methods

  Intent i = getIntent();
   String t = i.getStringExtra("Title");