You CAN start a load on a not yet attached View
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
If you call `Glide.with(fragment)` with a `Fragment` which `getActivity()` returns `null` you get an exception with this message:
> You cannot start a load on a not yet attached View or a Fragment where getActivity() returns null (which usually occurs when getActivity() is called before the Fragment is attached or after the Fragment is destroyed).
This is expected, all correct. The problem is the message:
> You cannot start a load on a **not yet attached View**
I checked the code and did some tests and I can call `Glide.with(view)` with an unattached `view` and it works like a charm. I suppect that there's a problem here. Or the message is wrong and we should remove the first part or we are not enfocing this part so we should check it and throw the exception as expected.
And even more the message say "You cannot start a load" and `Glide.with()` is not starting any load at all. You are just getting the RequestManager. I read in some places, [even the documentation](https://bumptech.github.io/glide/javadocs/490/com/bumptech/glide/Glide.html#with-android.view.View-), that keeping the `RequestManager` in memory is a good practice so maybe this check should be done later.
**Glide Version**: `4.9.0`
Contributor guide
Assessment
This issue has not been assessed yet.