Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

GlideBitmapLoader.createUsing uses cropView's size while it might not be laid out #77

Closed
ldiqual opened this issue May 10, 2017 · 1 comment

Comments

@ldiqual
Copy link

ldiqual commented May 10, 2017

The following code:

cropView
  .extensions()
  .using(GlideBitmapLoader.createUsing(cropView))
  .load(uri)

won't work if cropView is not yet laid out – even with #16 in – because GlideBitmapLoader.createUsing directly extracts cropView.getHeight() and cropView.getWidth(): https://github.com/lyft/scissors/blob/master/scissors/src/main/java/com/lyft/android/scissors/GlideBitmapLoader.java#L57-L61. At this point, cropView's dimension is 0:0.

I worked around this by adding a 100ms delay, but that's obviously hacky.

@mikecutalo
Copy link

Thank you for you contribution to this repository.

Closing this Issue as this repository is being archived.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants