Code example for ListFragment

Methods: onDetach

0
        mCallbacks = (Callbacks) activity;
    } 
 
    @Override 
    public void onDetach() { 
        super.onDetach(); 
        mCallbacks = sDummyCallbacks;
    } 
 
    @Override 
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        if (mSelectedCompanyId != null) {
            outState.putString(STATE_SELECTED_ID, mSelectedCompanyId);
        } 
    } 
 
    /** {@inheritDoc} */ 
    @Override 
    public void onListItemClick(ListView l, View v, int position, long id) {
        final Cursor cursor = (Cursor) mAdapter.getItem(position);