code: @SuppressWarnings("PrimitiveArrayArgumentToVariableArgMethod")
      private void visualizeItem(@NonNull final Item item, @NonNull final ItemViewHolder viewHolder) {
          viewHolder.iconImageView.setVisibility(iconCount > 0 ? View.VISIBLE : View.GONE);
          viewHolder.iconImageView.setEnabled(item.isEnabled());
  
          if (item.getIcon() != null && item.getIcon() instanceof StateListDrawable) {
              StateListDrawable stateListDrawable = (StateListDrawable) item.getIcon();
  
              try {
                  int[] currentState = viewHolder.iconImageView.getDrawableState();
                  Method getStateDrawableIndex =
                          StateListDrawable.class.getMethod("getStateDrawableIndex", int[].class);
                  Method getStateDrawable =
                          StateListDrawable.class.getMethod("getStateDrawable", int.class);
                  int index = (int) getStateDrawableIndex.invoke(stateListDrawable, currentState);
                  Drawable drawable = (Drawable) getStateDrawable.invoke(stateListDrawable, index);
                  viewHolder.iconImageView.setImageDrawable(drawable);
              } catch (Exception e) {
                  viewHolder.iconImageView.setImageDrawable(item.getIcon());
              }
          } else {
              viewHolder.iconImageView.setImageDrawable(item.getIcon());
          }
  
          viewHolder.titleTextView.setText(item.getTitle());
          viewHolder.titleTextView.setEnabled(item.isEnabled());
  
          if (getItemColor() != -1) {
              viewHolder.titleTextView.setTextColor(getItemColor());
          }
      }
docs: Visualizes a specific item.
  
  @param item
  The item, which should be visualized, as an instance of the class {@link Item}. The
  item may not be null
  @param viewHolder
  The view holder, which contains the views, which should be used to visualize the
  item, as an instance of the class {@link ItemViewHolder}. The view holder may not be
  null