content: package com.google.android.material.navigation;
  
  import android.content.Context;
  import android.content.res.ColorStateList;
  import android.graphics.drawable.Drawable;
  import android.util.SparseArray;
  import android.util.TypedValue;
  import android.view.MenuItem;
  import android.view.View;
  import android.view.ViewGroup;
  import android.view.accessibility.AccessibilityNodeInfo;
  import androidx.appcompat.content.res.AppCompatResources;
  import androidx.appcompat.view.menu.MenuBuilder;
  import androidx.appcompat.view.menu.MenuItemImpl;
  import androidx.appcompat.view.menu.MenuView;
  import androidx.core.util.Pools;
  import androidx.core.view.ViewCompat;
  import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
  import androidx.transition.AutoTransition;
  import androidx.transition.TransitionManager;
  import androidx.transition.TransitionSet;
  import com.google.android.material.R;
  import com.google.android.material.animation.AnimationUtils;
  import com.google.android.material.badge.BadgeDrawable;
  import com.google.android.material.internal.TextScale;
  import com.google.android.material.motion.MotionUtils;
  import com.google.android.material.shape.MaterialShapeDrawable;
  import com.google.android.material.shape.ShapeAppearanceModel;
  import java.util.HashSet;
  
  public abstract class NavigationBarMenuView extends ViewGroup implements MenuView {
      private static final int[] CHECKED_STATE_SET = {16842912};
      private static final int[] DISABLED_STATE_SET = {-16842910};
      private static final int ITEM_POOL_SIZE = 5;
      private static final int NO_PADDING = -1;
      private final SparseArray<BadgeDrawable> badgeDrawables = new SparseArray<>(5);
      private NavigationBarItemView[] buttons;
      private ColorStateList itemActiveIndicatorColor;
      private boolean itemActiveIndicatorEnabled;
      private int itemActiveIndicatorHeight;
      private int itemActiveIndicatorMarginHorizontal;
      private boolean itemActiveIndicatorResizeable = false;
      private ShapeAppearanceModel itemActiveIndicatorShapeAppearance;
      private int itemActiveIndicatorWidth;
      private Drawable itemBackground;
      private int itemBackgroundRes;
      private int itemIconSize;
      private ColorStateList itemIconTint;
      private int itemPaddingBottom = -1;
      private int itemPaddingTop = -1;
      private final Pools.Pool<NavigationBarItemView> itemPool = new Pools.SynchronizedPool(5);
      private int itemTextAppearanceActive;
      private int itemTextAppearanceInactive;
      private final ColorStateList itemTextColorDefault = createDefaultColorStateList(16842808);
      private ColorStateList itemTextColorFromUser;
      private int labelVisibilityMode;
      /* access modifiers changed from: private */
      public MenuBuilder menu;
      private final View.OnClickListener onClickListener;
      private final SparseArray<View.OnTouchListener> onTouchListeners = new SparseArray<>(5);
      /* access modifiers changed from: private */
      public NavigationBarPresenter presenter;
      private int selectedItemId = 0;
      private int selectedItemPosition = 0;
      private final TransitionSet set;
  
      public NavigationBarMenuView(Context context) {
          super(context);
          if (isInEditMode()) {
              this.set = null;
          } else {
              AutoTransition autoTransition = new AutoTransition();
              this.set = autoTransition;
              autoTransition.setOrdering(0);
              autoTransition.setDuration((long) MotionUtils.resolveThemeDuration(getContext(), R.attr.motionDurationLong1, getResources().getInteger(R.integer.material_motion_duration_long_1)));
              autoTransition.setInterpolator(MotionUtils.resolveThemeInterpolator(getContext(), R.attr.motionEasingStandard, AnimationUtils.FAST_OUT_SLOW_IN_INTERPOLATOR));
              autoTransition.addTransition(new TextScale());
          }
          this.onClickListener = new View.OnClickListener() {
              public void onClick(View v) {
                  MenuItemImpl itemData = ((NavigationBarItemView) v).getItemData();
                  if (!NavigationBarMenuView.this.menu.performItemAction(itemData, NavigationBarMenuView.this.presenter, 0)) {
                      itemData.setChecked(true);
                  }
              }
          };
          ViewCompat.setImportantForAccessibility(this, 1);
      }
  
      private Drawable createItemActiveIndicatorDrawable() {
          if (this.itemActiveIndicatorShapeAppearance == null || this.itemActiveIndicatorColor == null) {
              return null;
          }
          MaterialShapeDrawable materialShapeDrawable = new MaterialShapeDrawable(this.itemActiveIndicatorShapeAppearance);
          materialShapeDrawable.setFillColor(this.itemActiveIndicatorColor);
          return materialShapeDrawable;
      }
  
      private NavigationBarItemView getNewItem() {
          NavigationBarItemView acquire = this.itemPool.acquire();
          return acquire == null ? createNavigationBarItemView(getContext()) : acquire;
      }
  
      private boolean isValidId(int viewId) {
          return viewId != -1;
      }
  
      private void removeUnusedBadges() {
          HashSet hashSet = new HashSet();
          for (int i = 0; i < this.menu.size(); i++) {
              hashSet.add(Integer.valueOf(this.menu.getItem(i).getItemId()));
          }
          for (int i2 = 0; i2 < this.badgeDrawables.size(); i2++) {
              int keyAt = this.badgeDrawables.keyAt(i2);
              if (!hashSet.contains(Integer.valueOf(keyAt))) {
                  this.badgeDrawables.delete(keyAt);
              }
          }
      }
  
      private void setBadgeIfNeeded(NavigationBarItemView child) {
          BadgeDrawable badgeDrawable;
          int id = child.getId();
          if (isValidId(id) && (badgeDrawable = this.badgeDrawables.get(id)) != null) {
              child.setBadge(badgeDrawable);
          }
      }
  
      private void validateMenuItemId(int viewId) {
          if (!isValidId(viewId)) {
              throw new IllegalArgumentException(viewId + " is not a valid view id");
          }
      }
  
      public void buildMenuView() {
          removeAllViews();
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView navigationBarItemView : navigationBarItemViewArr) {
                  if (navigationBarItemView != null) {
                      this.itemPool.release(navigationBarItemView);
                      navigationBarItemView.clear();
                  }
              }
          }
          if (this.menu.size() == 0) {
              this.selectedItemId = 0;
              this.selectedItemPosition = 0;
              this.buttons = null;
              return;
          }
          removeUnusedBadges();
          this.buttons = new NavigationBarItemView[this.menu.size()];
          boolean isShifting = isShifting(this.labelVisibilityMode, this.menu.getVisibleItems().size());
          for (int i = 0; i < this.menu.size(); i++) {
              this.presenter.setUpdateSuspended(true);
              this.menu.getItem(i).setCheckable(true);
              this.presenter.setUpdateSuspended(false);
              NavigationBarItemView newItem = getNewItem();
              this.buttons[i] = newItem;
              newItem.setIconTintList(this.itemIconTint);
              newItem.setIconSize(this.itemIconSize);
              newItem.setTextColor(this.itemTextColorDefault);
              newItem.setTextAppearanceInactive(this.itemTextAppearanceInactive);
              newItem.setTextAppearanceActive(this.itemTextAppearanceActive);
              newItem.setTextColor(this.itemTextColorFromUser);
              int i2 = this.itemPaddingTop;
              if (i2 != -1) {
                  newItem.setItemPaddingTop(i2);
              }
              int i3 = this.itemPaddingBottom;
              if (i3 != -1) {
                  newItem.setItemPaddingBottom(i3);
              }
              newItem.setActiveIndicatorWidth(this.itemActiveIndicatorWidth);
              newItem.setActiveIndicatorHeight(this.itemActiveIndicatorHeight);
              newItem.setActiveIndicatorMarginHorizontal(this.itemActiveIndicatorMarginHorizontal);
              newItem.setActiveIndicatorDrawable(createItemActiveIndicatorDrawable());
              newItem.setActiveIndicatorResizeable(this.itemActiveIndicatorResizeable);
              newItem.setActiveIndicatorEnabled(this.itemActiveIndicatorEnabled);
              Drawable drawable = this.itemBackground;
              if (drawable != null) {
                  newItem.setItemBackground(drawable);
              } else {
                  newItem.setItemBackground(this.itemBackgroundRes);
              }
              newItem.setShifting(isShifting);
              newItem.setLabelVisibilityMode(this.labelVisibilityMode);
              MenuItemImpl menuItemImpl = (MenuItemImpl) this.menu.getItem(i);
              newItem.initialize(menuItemImpl, 0);
              newItem.setItemPosition(i);
              int itemId = menuItemImpl.getItemId();
              newItem.setOnTouchListener(this.onTouchListeners.get(itemId));
              newItem.setOnClickListener(this.onClickListener);
              int i4 = this.selectedItemId;
              if (i4 != 0 && itemId == i4) {
                  this.selectedItemPosition = i;
              }
              setBadgeIfNeeded(newItem);
              addView(newItem);
          }
          int min = Math.min(this.menu.size() - 1, this.selectedItemPosition);
          this.selectedItemPosition = min;
          this.menu.getItem(min).setChecked(true);
      }
  
      public ColorStateList createDefaultColorStateList(int baseColorThemeAttr) {
          TypedValue typedValue = new TypedValue();
          if (!getContext().getTheme().resolveAttribute(baseColorThemeAttr, typedValue, true)) {
              return null;
          }
          ColorStateList colorStateList = AppCompatResources.getColorStateList(getContext(), typedValue.resourceId);
          if (!getContext().getTheme().resolveAttribute(androidx.appcompat.R.attr.colorPrimary, typedValue, true)) {
              return null;
          }
          int i = typedValue.data;
          int defaultColor = colorStateList.getDefaultColor();
          int[] iArr = DISABLED_STATE_SET;
          return new ColorStateList(new int[][]{iArr, CHECKED_STATE_SET, EMPTY_STATE_SET}, new int[]{colorStateList.getColorForState(iArr, defaultColor), i, defaultColor});
      }
  
      /* access modifiers changed from: protected */
      public abstract NavigationBarItemView createNavigationBarItemView(Context context);
  
      public NavigationBarItemView findItemView(int menuItemId) {
          validateMenuItemId(menuItemId);
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr == null) {
              return null;
          }
          for (NavigationBarItemView navigationBarItemView : navigationBarItemViewArr) {
              if (navigationBarItemView.getId() == menuItemId) {
                  return navigationBarItemView;
              }
          }
          return null;
      }
  
      public BadgeDrawable getBadge(int menuItemId) {
          return this.badgeDrawables.get(menuItemId);
      }
  
      /* access modifiers changed from: package-private */
      public SparseArray<BadgeDrawable> getBadgeDrawables() {
          return this.badgeDrawables;
      }
  
      public ColorStateList getIconTintList() {
          return this.itemIconTint;
      }
  
      public ColorStateList getItemActiveIndicatorColor() {
          return this.itemActiveIndicatorColor;
      }
  
      public boolean getItemActiveIndicatorEnabled() {
          return this.itemActiveIndicatorEnabled;
      }
  
      public int getItemActiveIndicatorHeight() {
          return this.itemActiveIndicatorHeight;
      }
  
      public int getItemActiveIndicatorMarginHorizontal() {
          return this.itemActiveIndicatorMarginHorizontal;
      }
  
      public ShapeAppearanceModel getItemActiveIndicatorShapeAppearance() {
          return this.itemActiveIndicatorShapeAppearance;
      }
  
      public int getItemActiveIndicatorWidth() {
          return this.itemActiveIndicatorWidth;
      }
  
      public Drawable getItemBackground() {
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          return (navigationBarItemViewArr == null || navigationBarItemViewArr.length <= 0) ? this.itemBackground : navigationBarItemViewArr[0].getBackground();
      }
  
      @Deprecated
      public int getItemBackgroundRes() {
          return this.itemBackgroundRes;
      }
  
      public int getItemIconSize() {
          return this.itemIconSize;
      }
  
      public int getItemPaddingBottom() {
          return this.itemPaddingBottom;
      }
  
      public int getItemPaddingTop() {
          return this.itemPaddingTop;
      }
  
      public int getItemTextAppearanceActive() {
          return this.itemTextAppearanceActive;
      }
  
      public int getItemTextAppearanceInactive() {
          return this.itemTextAppearanceInactive;
      }
  
      public ColorStateList getItemTextColor() {
          return this.itemTextColorFromUser;
      }
  
      public int getLabelVisibilityMode() {
          return this.labelVisibilityMode;
      }
  
      /* access modifiers changed from: protected */
      public MenuBuilder getMenu() {
          return this.menu;
      }
  
      /* access modifiers changed from: package-private */
      public BadgeDrawable getOrCreateBadge(int menuItemId) {
          validateMenuItemId(menuItemId);
          BadgeDrawable badgeDrawable = this.badgeDrawables.get(menuItemId);
          if (badgeDrawable == null) {
              badgeDrawable = BadgeDrawable.create(getContext());
              this.badgeDrawables.put(menuItemId, badgeDrawable);
          }
          NavigationBarItemView findItemView = findItemView(menuItemId);
          if (findItemView != null) {
              findItemView.setBadge(badgeDrawable);
          }
          return badgeDrawable;
      }
  
      public int getSelectedItemId() {
          return this.selectedItemId;
      }
  
      /* access modifiers changed from: protected */
      public int getSelectedItemPosition() {
          return this.selectedItemPosition;
      }
  
      public int getWindowAnimations() {
          return 0;
      }
  
      public void initialize(MenuBuilder menu2) {
          this.menu = menu2;
      }
  
      /* access modifiers changed from: protected */
      public boolean isItemActiveIndicatorResizeable() {
          return this.itemActiveIndicatorResizeable;
      }
  
      /* access modifiers changed from: protected */
      public boolean isShifting(int labelVisibilityMode2, int childCount) {
          return labelVisibilityMode2 == -1 ? childCount > 3 : labelVisibilityMode2 == 0;
      }
  
      public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
          super.onInitializeAccessibilityNodeInfo(info);
          AccessibilityNodeInfoCompat.wrap(info).setCollectionInfo(AccessibilityNodeInfoCompat.CollectionInfoCompat.obtain(1, this.menu.getVisibleItems().size(), false, 1));
      }
  
      /* access modifiers changed from: package-private */
      public void removeBadge(int menuItemId) {
          validateMenuItemId(menuItemId);
          BadgeDrawable badgeDrawable = this.badgeDrawables.get(menuItemId);
          NavigationBarItemView findItemView = findItemView(menuItemId);
          if (findItemView != null) {
              findItemView.removeBadge();
          }
          if (badgeDrawable != null) {
              this.badgeDrawables.remove(menuItemId);
          }
      }
  
      /* access modifiers changed from: package-private */
      public void restoreBadgeDrawables(SparseArray<BadgeDrawable> sparseArray) {
          for (int i = 0; i < sparseArray.size(); i++) {
              int keyAt = sparseArray.keyAt(i);
              if (this.badgeDrawables.indexOfKey(keyAt) < 0) {
                  this.badgeDrawables.append(keyAt, sparseArray.get(keyAt));
              }
          }
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView navigationBarItemView : navigationBarItemViewArr) {
                  navigationBarItemView.setBadge(this.badgeDrawables.get(navigationBarItemView.getId()));
              }
          }
      }
  
      public void setIconTintList(ColorStateList tint) {
          this.itemIconTint = tint;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView iconTintList : navigationBarItemViewArr) {
                  iconTintList.setIconTintList(tint);
              }
          }
      }
  
      public void setItemActiveIndicatorColor(ColorStateList csl) {
          this.itemActiveIndicatorColor = csl;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView activeIndicatorDrawable : navigationBarItemViewArr) {
                  activeIndicatorDrawable.setActiveIndicatorDrawable(createItemActiveIndicatorDrawable());
              }
          }
      }
  
      public void setItemActiveIndicatorEnabled(boolean enabled) {
          this.itemActiveIndicatorEnabled = enabled;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView activeIndicatorEnabled : navigationBarItemViewArr) {
                  activeIndicatorEnabled.setActiveIndicatorEnabled(enabled);
              }
          }
      }
  
      public void setItemActiveIndicatorHeight(int height) {
          this.itemActiveIndicatorHeight = height;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView activeIndicatorHeight : navigationBarItemViewArr) {
                  activeIndicatorHeight.setActiveIndicatorHeight(height);
              }
          }
      }
  
      public void setItemActiveIndicatorMarginHorizontal(int marginHorizontal) {
          this.itemActiveIndicatorMarginHorizontal = marginHorizontal;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView activeIndicatorMarginHorizontal : navigationBarItemViewArr) {
                  activeIndicatorMarginHorizontal.setActiveIndicatorMarginHorizontal(marginHorizontal);
              }
          }
      }
  
      /* access modifiers changed from: protected */
      public void setItemActiveIndicatorResizeable(boolean resizeable) {
          this.itemActiveIndicatorResizeable = resizeable;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView activeIndicatorResizeable : navigationBarItemViewArr) {
                  activeIndicatorResizeable.setActiveIndicatorResizeable(resizeable);
              }
          }
      }
  
      public void setItemActiveIndicatorShapeAppearance(ShapeAppearanceModel shapeAppearance) {
          this.itemActiveIndicatorShapeAppearance = shapeAppearance;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView activeIndicatorDrawable : navigationBarItemViewArr) {
                  activeIndicatorDrawable.setActiveIndicatorDrawable(createItemActiveIndicatorDrawable());
              }
          }
      }
  
      public void setItemActiveIndicatorWidth(int width) {
          this.itemActiveIndicatorWidth = width;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView activeIndicatorWidth : navigationBarItemViewArr) {
                  activeIndicatorWidth.setActiveIndicatorWidth(width);
              }
          }
      }
  
      public void setItemBackground(Drawable background) {
          this.itemBackground = background;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView itemBackground2 : navigationBarItemViewArr) {
                  itemBackground2.setItemBackground(background);
              }
          }
      }
  
      public void setItemBackgroundRes(int background) {
          this.itemBackgroundRes = background;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView itemBackground2 : navigationBarItemViewArr) {
                  itemBackground2.setItemBackground(background);
              }
          }
      }
  
      public void setItemIconSize(int iconSize) {
          this.itemIconSize = iconSize;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView iconSize2 : navigationBarItemViewArr) {
                  iconSize2.setIconSize(iconSize);
              }
          }
      }
  
      public void setItemOnTouchListener(int menuItemId, View.OnTouchListener onTouchListener) {
          if (onTouchListener == null) {
              this.onTouchListeners.remove(menuItemId);
          } else {
              this.onTouchListeners.put(menuItemId, onTouchListener);
          }
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView navigationBarItemView : navigationBarItemViewArr) {
                  if (navigationBarItemView.getItemData().getItemId() == menuItemId) {
                      navigationBarItemView.setOnTouchListener(onTouchListener);
                  }
              }
          }
      }
  
      public void setItemPaddingBottom(int paddingBottom) {
          this.itemPaddingBottom = paddingBottom;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView itemPaddingBottom2 : navigationBarItemViewArr) {
                  itemPaddingBottom2.setItemPaddingBottom(paddingBottom);
              }
          }
      }
  
      public void setItemPaddingTop(int paddingTop) {
          this.itemPaddingTop = paddingTop;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView itemPaddingTop2 : navigationBarItemViewArr) {
                  itemPaddingTop2.setItemPaddingTop(paddingTop);
              }
          }
      }
  
      public void setItemTextAppearanceActive(int textAppearanceRes) {
          this.itemTextAppearanceActive = textAppearanceRes;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView navigationBarItemView : navigationBarItemViewArr) {
                  navigationBarItemView.setTextAppearanceActive(textAppearanceRes);
                  ColorStateList colorStateList = this.itemTextColorFromUser;
                  if (colorStateList != null) {
                      navigationBarItemView.setTextColor(colorStateList);
                  }
              }
          }
      }
  
      public void setItemTextAppearanceInactive(int textAppearanceRes) {
          this.itemTextAppearanceInactive = textAppearanceRes;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView navigationBarItemView : navigationBarItemViewArr) {
                  navigationBarItemView.setTextAppearanceInactive(textAppearanceRes);
                  ColorStateList colorStateList = this.itemTextColorFromUser;
                  if (colorStateList != null) {
                      navigationBarItemView.setTextColor(colorStateList);
                  }
              }
          }
      }
  
      public void setItemTextColor(ColorStateList color) {
          this.itemTextColorFromUser = color;
          NavigationBarItemView[] navigationBarItemViewArr = this.buttons;
          if (navigationBarItemViewArr != null) {
              for (NavigationBarItemView textColor : navigationBarItemViewArr) {
                  textColor.setTextColor(color);
              }
          }
      }
  
      public void setLabelVisibilityMode(int labelVisibilityMode2) {
          this.labelVisibilityMode = labelVisibilityMode2;
      }
  
      public void setPresenter(NavigationBarPresenter presenter2) {
          this.presenter = presenter2;
      }
  
      /* access modifiers changed from: package-private */
      public void tryRestoreSelectedItemId(int itemId) {
          int size = this.menu.size();
          for (int i = 0; i < size; i++) {
              MenuItem item = this.menu.getItem(i);
              if (itemId == item.getItemId()) {
                  this.selectedItemId = itemId;
                  this.selectedItemPosition = i;
                  item.setChecked(true);
                  return;
              }
          }
      }
  
      public void updateMenuView() {
          TransitionSet transitionSet;
          MenuBuilder menuBuilder = this.menu;
          if (menuBuilder != null && this.buttons != null) {
              int size = menuBuilder.size();
              if (size != this.buttons.length) {
                  buildMenuView();
                  return;
              }
              int i = this.selectedItemId;
              for (int i2 = 0; i2 < size; i2++) {
                  MenuItem item = this.menu.getItem(i2);
                  if (item.isChecked()) {
                      this.selectedItemId = item.getItemId();
                      this.selectedItemPosition = i2;
                  }
              }
              if (!(i == this.selectedItemId || (transitionSet = this.set) == null)) {
                  TransitionManager.beginDelayedTransition(this, transitionSet);
              }
              boolean isShifting = isShifting(this.labelVisibilityMode, this.menu.getVisibleItems().size());
              for (int i3 = 0; i3 < size; i3++) {
                  this.presenter.setUpdateSuspended(true);
                  this.buttons[i3].setLabelVisibilityMode(this.labelVisibilityMode);
                  this.buttons[i3].setShifting(isShifting);
                  this.buttons[i3].initialize((MenuItemImpl) this.menu.getItem(i3), 0);
                  this.presenter.setUpdateSuspended(false);
              }
          }
      }
  }
  