waitForLayout

fun waitForLayout(): ViewTarget<T, Z>

Indicates that Glide should always wait for any pending layout pass before checking for the size an View.

By default, Glide will only wait for a pending layout pass if it's unable to resolve the size from the LayoutParams or valid non-zero values for getWidth and getHeight.

Because calling this method forces Glide to wait for the layout pass to occur before starting loads, setting this parameter to true can cause Glide to asynchronous load an image even if it's in the memory cache. The load will happen asynchronously because Glide has to wait for a layout pass to occur, which won't necessarily happen in the same frame as when the image is requested. As a result, using this method can resulting in flashing in some cases and should be used sparingly.

If the LayoutParams of the wrapped View are set to fixed sizes, they will still be used instead of the View's dimensions even if this method is called. This parameter is a fallback only.