Code example for ListFragment

Methods: setArguments

0
		SeasonsListFragment instance = new SeasonsListFragment();
 
		Bundle args = new Bundle();
		args.putInt("showId", showId);
 
		instance.setArguments(args);
		return instance;
	} 
 
	@Override 
	public void onAttach(Activity activity) {
		super.onAttach(activity);
 
		try { 
			onSeasonSelectedListener = (OnSeasonSelectedListener)activity;
		} catch (ClassCastException e) {
			String message =
				String.format("%s must implement OnSeasonSelectedListener",
				              activity.toString());
			throw new ClassCastException(message);
		}