Code example for ListFragment

Methods: getArguments

0
		 
		return f;
	} 
 
	public int getShownIndex() { 
		return getArguments().getInt("index", 0);
	} 
	 
	public int getPreviousFragmentId() { 
		return getArguments().getInt("prevFragmentId", sId);
	} 
 
 
 
	@Override 
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		int previousFragmentId = getPreviousFragmentId();
		sId = ++previousFragmentId;
		if (savedInstanceState != null) {
			// Restore last state for checked position.