github.com/dallasgutauckis § RESAMPLE
§ Save
memory
when
determining
resample
factor,
just
decode
bounds
§ inSampleSize
to
tell
the
system
to
resample
§ Number
is
a
raRo
(1
pixel
for
every
X
original
pixels)
§ Factors
of
2
are
typically
more
performant
15
github.com/dallasgutauckis § Avoid
the
ominous
"bitmap
is
recycled"
excepRon
§ Check
for
recycled
bitmaps
§ Bitmap#isRecycled();
§ ImageView#setImageBitmap(null);
§ Re-‐download
16
RuntimeException: trying to use a recycled bitmap android.graphics.Bitmap
github.com/dallasgutauckis § Trying
to
draw
recycled
bitmaps
§ Determining
the
size
of
a
Bitmap
by
decoding
the
enRre
Bitmap
§ Downloading
items
that
may
never
be
visible
§ LruCache
is
thread-‐safe.
Synchronize!
17