Code example for SparseArray

Methods: saveHierarchyState

0
    public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) {
        return false; 
    } 
 
    public void saveHierarchyState(Bundle outState) {
        SparseArray<Parcelable> viewStates = new SparseArray<Parcelable>();
        if (mMenuView != null) {
            ((View) mMenuView).saveHierarchyState(viewStates);
        } 
        outState.putSparseParcelableArray(VIEWS_TAG, viewStates);
    } 
 
    public void restoreHierarchyState(Bundle inState) {
        SparseArray<Parcelable> viewStates = inState.getSparseParcelableArray(VIEWS_TAG);
        if (viewStates != null) {
            ((View) mMenuView).restoreHierarchyState(viewStates);
        } 
    } 
 
    public void setId(int id) {
Contextual code suggestions in your IDE  Get Codota for Java