Code example for ViewGroup

Methods: removeView

     * @param childIndex Index within the parent to insert at 
    protected void addItemView(View itemView, int childIndex) {
        final ViewGroup currentParent = (ViewGroup) itemView.getParent();
        if (currentParent != null) {
        ((ViewGroup) mMenuView).addView(itemView, childIndex);
     * Filter the child view at index and remove it if appropriate. 
     * @param parent Parent to filter from 
     * @param childIndex Index to filter 
     * @return true if the child view at index was removed 
    protected boolean filterLeftoverView(ViewGroup parent, int childIndex) {
        return true;