docs: public static void addOnGlobalLayoutListener(final View view, final Runnable runnable) {
          ViewTreeObserver vto = view.getViewTreeObserver();
          vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
              @SuppressWarnings("deprecation")
              @Override
              public void onGlobalLayout() {
                  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
                      view.getViewTreeObserver().removeGlobalOnLayoutListener(this);
                  } else {
                      view.getViewTreeObserver().removeOnGlobalLayoutListener(this);
                  }
                  runnable.run();
              }
          });
      }