Code example for ListFragment

Methods: setArguments

		DataViewFragment f = new DataViewFragment();
		// Supply index input as an argument. 
		Bundle args = new Bundle();
		args.putInt("index", index);
		args.putInt("prevFragmentId", previousFragmentId);
		args = null;
		return f;
	public int getShownIndex() { 
		return getArguments().getInt("index", 0);
	public int getPreviousFragmentId() { 
		return getArguments().getInt("prevFragmentId", sId);
Connect your IDE to all the code out there  Get Codota for Java