code: public static void executeOnGlobalLayout(@NonNull final Activity activity, @NonNull final ViewTreeObserver.OnGlobalLayoutListener listener) {
          executeOnGlobalLayout(activity.getWindow().getDecorView().findViewById(android.R.id.content), listener);
      }
docs: Helper that removes the drudgery of using ViewTreeObserver
  
  @param activity used to retrieve a View that can be
  @param listener