Code example for ListFragment

Methods: getActivity, onPause

0
        } 
    } 
 
    @Override 
    public void onPause() { 
        super.onPause(); 
        getActivity().getContentResolver().unregisterContentObserver(mVendorChangesObserver);
    } 
 
    @Override 
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putInt(STATE_CHECKED_POSITION, mCheckedPosition);
    } 
 
    /** {@inheritDoc} */ 
    @Override 
    public void onListItemClick(ListView l, View v, int position, long id) {
        // Launch viewer for specific vendor. 
        final Cursor cursor = (Cursor)mAdapter.getItem(position);
Stop searching for code, let great code find you!  Add Codota to your java IDE