Code example for ListFragment

Methods: onDetach

0
	{ 
		if (mSaveOnDetach)
		{ 
			saveListState(); 
		} 
		super.onDetach(); 
	} 
 
 
	@Override 
	public void onItemClick(AdapterView<?> adapterView, View view, int position, long rowId)
	{ 
		VisibleListAdapter adapter = (VisibleListAdapter) adapterView.getAdapter();
		VisibleListAdapter.CheckableItem item = (VisibleListAdapter.CheckableItem) view.getTag();
		boolean checked = item.cb.isChecked();
		item.cb.setChecked(!checked);
		adapter.addToState(rowId, !checked);
	} 
 
 
	@Override