@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_course); ctx = getApplicationContext(); courseListFragment = (CourseListFragment) getSupportFragmentManager().findFragmentById(R.id.course_fragment); CMApp app = (CMApp) getApplication(); courseListFragment.setImageLoader(app.getImageLoader()); trainee = (TraineeDTO) getIntent().getExtras().getSerializable("trainee"); courseListFragment.setTrainee(trainee); setTitle(getResources().getString(R.string.class_courses)); }
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == START_ACTIVITY_LIST) { if (resultCode == Activity.RESULT_OK) { completedCount = data.getIntExtra("count", 0); trainee.setTotalCompleted(trainee.getTotalCompleted() + completedCount); Log.i(LOG, "onActivityResult setting activity count " + completedCount); courseListFragment.setActivityCompleted(completedCount); } } }