Use onPreDrawListener instead. Add copyright sections.

Apparently the `onGlobalLayoutListener` is not always called...weirdly enough a view in the gridview adapter is not measured, picasso registers a global layout listener which is never invoked.

Using `onPreDrawListener` does it and also appears to be invoked way fewer times than the layout one.