Code example for ListFragment

Methods: onDestroyView

0
        return lv;
    } 
     
    @Override 
    public void onDestroyView(){ 
        super.onDestroyView(); 
        ViewParent p = lv.getParent();
        if(p != null)
            ((ViewGroup)p).removeView(lv);
    } 
 
    @Override 
    public void onCreate(Bundle b) {
        super.onCreate(b);
        if(b != null)
            xmlId = b.getInt("xml");
        mPreferenceManager = onCreatePreferenceManager();
        lv = (ListView) LayoutInflater.from(getActivity()).inflate(R.layout.preference_list_content, null);
        //lv.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_INSET); 
        addPreferencesFromResource(xmlId);
        postBindPreferences();