Code example for ListFragment

Methods: getActivity, onPause

0
        } 
    } 
 
    @Override 
    public void onPause() { 
        super.onPause(); 
        mMessageQueueHandler.removeCallbacks(mRefreshRunnable);
        getActivity().getContentResolver().unregisterContentObserver(mChangesObserver);
    } 
 
    @Override 
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
    } 
 
 
    @Override 
    public void onListItemClick(ListView l, View v, int position, long id) {
    	int category_id = ((BrowseItemView)v).getCategoryID();
    	Toast.makeText(getActivity(), ((BrowseItemView)v).getTitle(), Toast.LENGTH_SHORT).show();
    }