Monday 19 November 2012

Android: Starting new Activity with custom object through Intent


public class TaskActivity extends Activity
{

@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.task);
Intent i = getIntent();
Task task = (Task) i.getSerializableExtra("task");

if (task != null) displayValues(task);
configureButtons();
}
}


For the part that how it gets this object from the intent and how was it set to the intent please view my previous post . This post is in continuation of the previous

No comments:

Post a Comment