Re: [android-developers] [BUG] Easily Reproducable Bug in Regards to Bitmaps, Memory, and Recycling [sample project included]
On Fri, Jan 7, 2011 at 12:36 PM, Joe McCann <joseph.isaac@gmail.com> wrote:
> In a nutshell, I have/am trying to create reusable UI components in
> XML. I created a dead simple project that only fires an activity to
> show the UI.
Your "dead simple project" will not run on any version of Android, due
to a typo in your manifest.
Also, on the Android 2.3 emulator, your "dead simple project" crashes
immediately with a "bitmap size exceeds VM budget".
Your problem can be solved by removing your recycle() call and putting
your background PNG into the appropriate resource sets (drawable-ldpi,
drawable-mdpi, drawable-hdpi). This has a side benefit of allowing
your application to run on Android 2.3.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
Warescription: Three Android Books, Plus Updates, One Low Price!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home