Search in sources :

Example 1 with DecorToolbar

use of android.support.v7.widget.DecorToolbar in project Carbon by ZieIony.

the class Toolbar method setChildVisibilityForExpandedActionView.

/**
     * @ hide
     */
/*public DecorToolbar getWrapper() {
        if (mWrapper == null) {
            mWrapper = new ToolbarWidgetWrapper(this, true);
        }
        return mWrapper;
    }*/
private void setChildVisibilityForExpandedActionView(boolean expand) {
    final int childCount = getChildCount();
    for (int i = 0; i < childCount; i++) {
        final View child = getChildAt(i);
        final LayoutParams lp = (LayoutParams) child.getLayoutParams();
        if (lp.mViewType != LayoutParams.EXPANDED && child != mMenuView) {
            child.setVisibility(expand ? GONE : VISIBLE);
        }
    }
}
Also used : CollapsibleActionView(android.support.v7.view.CollapsibleActionView) MenuView(android.support.v7.view.menu.MenuView) View(android.view.View) ImageView(carbon.widget.ImageView) TextView(carbon.widget.TextView) ActionMenuView(android.support.v7.widget.ActionMenuView)

Aggregations

CollapsibleActionView (android.support.v7.view.CollapsibleActionView)1 MenuView (android.support.v7.view.menu.MenuView)1 ActionMenuView (android.support.v7.widget.ActionMenuView)1 View (android.view.View)1 ImageView (carbon.widget.ImageView)1 TextView (carbon.widget.TextView)1