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"); 
        } 
    } 
 
    public interface ListItemSelectedListener {