Skip to content
This repository has been archived by the owner on Oct 15, 2018. It is now read-only.

CacheableBitmapDrawable sets null in detach, should probably just set unused #55

Open
arberg opened this issue Jan 15, 2016 · 0 comments

Comments

@arberg
Copy link

arberg commented Jan 15, 2016

I suggest to replace current onDetachFromWindow with

@Override
protected void onAttachedToWindow() {
    super.onAttachedToWindow();
    onDrawableUnset(getDrawable());
}

@Override
protected void onDetachedFromWindow() {
    super.onDetachedFromWindow();
    onDrawableSet(getDrawable());
}

I had an issue earlier which caused me to disable using CacheableBitmapDrawable in favor of ImageView. I have now tested again with CacheableBitmapDrawable but could not reproduce problem (probably my usage has changed). However my memory told me the problem probably came from nulling. Hence the above change, which I deem healthy.

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

1 participant