I work on an app in which we use TweetViews in a RecyclerView. We have repeatedly observed the following crash: http://crashes.to/s/abe498ca58c
The crash is caused by an OutOfMemoryError which seems to occur when the 60 drawables for the animated transition on the "Like" button are loaded as part of the layout inflation of the ToggleImageButton. This probably only happens when memory pressure is already quite high, but weirdly we haven't seen other OutOfMemoryError crashes in this app.
Ironically (and frustratingly) our app does not even enable the tweet actions (i.e. tweetActionsEnabled in BaseTweetView always remains false), so this "Like" button with its fancy 60fps (total overkill if you ask me) animation is never even shown!
I think there must be way to achieve a similar animated transition using less memory-hungry means (animated vector drawables perhaps?). Also, would it be possible to offer a more lightweight (as in, non-animated, no hidden action bar views, etc.)?
Some more info:
Android API Version: >= 21 (v5.0.x)
Android Device (include Model and Manufacturer): Samsung gt_i9515, sm_g900f, sm_a300fu
I work on an app in which we use
TweetView
s in aRecyclerView
. We have repeatedly observed the following crash: http://crashes.to/s/abe498ca58cThe crash is caused by an
OutOfMemoryError
which seems to occur when the 60 drawables for the animated transition on the "Like" button are loaded as part of the layout inflation of theToggleImageButton
. This probably only happens when memory pressure is already quite high, but weirdly we haven't seen otherOutOfMemoryError
crashes in this app.Ironically (and frustratingly) our app does not even enable the tweet actions (i.e.
tweetActionsEnabled
inBaseTweetView
always remainsfalse
), so this "Like" button with its fancy 60fps (total overkill if you ask me) animation is never even shown!I think there must be way to achieve a similar animated transition using less memory-hungry means (animated vector drawables perhaps?). Also, would it be possible to offer a more lightweight (as in, non-animated, no hidden action bar views, etc.)?
Some more info:
com.twitter.sdk.android:twitter:1.13.1@aar
Thanks in advance.