Code example for ViewGroup

Methods: getChildAt

0
        menuView.setNumActualItemsShown(needsMore ? mMaxItems - 1 : itemsToShow.size());
    } 
 
    @Override 
    protected boolean filterLeftoverView(ViewGroup parent, int childIndex) {
        if (parent.getChildAt(childIndex) != mMoreView) {
            return super.filterLeftoverView(parent, childIndex);
        } 
        return false; 
    } 
 
    public int getNumActualItemsShown() { 
        return ((IconMenuView) mMenuView).getNumActualItemsShown(); 
    } 
 
    public void saveHierarchyState(Bundle outState) {
        SparseArray<Parcelable> viewStates = new SparseArray<Parcelable>();
        if (mMenuView != null) { 
            ((View) mMenuView).saveHierarchyState(viewStates);
        } 
        outState.putSparseParcelableArray(VIEWS_TAG, viewStates);