android - define Bitmap bytes count and set limit to bitmap buffer -


in application have image viewer , getting bitmaps web server. in order increase performance of app, have buffer of bitmaps. max size of 1 bitmap can 0.5mb. have buffersize variable want store buffer bytes count , therefore need know each bitmap size going add in buffer.and if bites count exceed x number delete bitmap front of buffer. , here problems:

  1. i don't know how define bitmap bytes count
  2. i need suggestion x number .

thanks in advance.

  1. you can number of bytes in bitmap using getbytecount() method.
  2. depends on how memory app using, how many images retrieving web server, , how need display them. use fraction of system.maxmemory(). in case

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -