Code example for LinearLayout

Methods: removeViewAt

0
    /** 
     * Remove a action from the action bar. 
     * @param index position of action to remove 
     */ 
    public void removeActionAt(int index) {
        mActionsView.removeViewAt(index);
    } 
 
    /** 
     * Remove a action from the action bar. 
     * @param action The action to remove 
     */ 
    public void removeAction(Action action) {
        int childCount = mActionsView.getChildCount();
        for (int i = 0; i < childCount; i++) {
            View view = mActionsView.getChildAt(i);
            if (view != null) {
                final Object tag = view.getTag();
                if (tag instanceof Action && tag.equals(action)) {
                    mActionsView.removeView(view);
                }