Code example for ListFragment

Methods: getArguments, getResources, onCreate

0
		public void onListItemClicked(int listviewNumber);
	} 
	 
    @Override 
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		mNum = getArguments() != null ? getArguments().getInt("num") : 1;
		resources = this.getResources();
		 
		if (mNum == 0)
			ec = new EnergyCriteria(resources);
		else if (mNum == 1)
			hc = new HungerCriteria(resources);
		else if (mNum == 2)
			cc = new CostCriteria(resources);
		else 
			Log.wtf("WTFWTFWTFWTFWTFWTFWTFWTFWTF" , "FAILURE ON ARGS NUM <> 0,1,or2");
		 
    } 
 
	@Override