Code example for ListFragment

Methods: getActivity, onPause

0
    /** 
     * @see android.app.Activity#onPause() 
     */ 
    @Override 
    public void onPause() { 
        super.onPause(); 
        getActivity().unregisterReceiver(receiver);
    } 
 
    /** 
     * @see android.app.Activity#onResume() 
     */ 
    @Override 
    public void onResume() { 
        super.onResume(); 
        refresh(); 
        getActivity().registerReceiver(receiver, filter);
    } 
 
    /** 
     * @see android.app.ListFragment#onListItemClick(android.widget.ListView, android.view.View, int, long)