Code example for ListFragment

Methods: onSaveInstanceState

0
        } 
    } 
 
    @Override 
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putInt("index", index);
    } 
 
    @Override 
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        try { 
            selectedListener = (ListItemSelectedListener) activity;
        } catch (ClassCastException e) {
            throw new ClassCastException(activity.toString()
                    + " must implement ListItemSelectedListener in Activity"); 
        } 
    } 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE