use of android.support.v7.internal.view.menu.MenuView in project material by rey5137.
the class ToolbarManager method onGlobalLayout.
private void onGlobalLayout() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
mToolbar.getViewTreeObserver().removeOnGlobalLayoutListener(mOnGlobalLayoutListener);
else
mToolbar.getViewTreeObserver().removeGlobalOnLayoutListener(mOnGlobalLayoutListener);
ActionMenuView menuView = getMenuView();
for (int i = 0, count = menuView == null ? 0 : menuView.getChildCount(); i < count; i++) {
View child = menuView.getChildAt(i);
if (mRippleStyle != 0) {
if (child.getBackground() == null || !(child.getBackground() instanceof ToolbarRippleDrawable))
ViewUtil.setBackground(child, getBackground());
}
}
if (mGroupChanged) {
animateIn();
mGroupChanged = false;
}
}
Aggregations