How to display a large bunch of bitmaps with different sizes and dimensions?

cmweb

Active Member
Licensed User
Longtime User
EDIT: I'm very sorry, I've posted to the wrong board by mistake. :-(


Hi everybody,

in my app, I show a few hundreds bitmaps (smileys) in a scroll view.

I'm looking for a best practice how to display them in the best way. Problem is, that these bitmaps are totally different in width and heigth. Therefore, the screen looks like a mess:



My current code to figure out the display size of each imageview is the following:

B4X:
imgWidth = s.width * 2
      imgheight = s.height * 2
      merker = imgwidth / imgheight
      imgheight = 75
      If merker > 1 Then 
         imgwidth = 90 * merker
         Else
         imgwidth = 90
         End If

s is the bitmap.

Any ideas on how to improve that?

Best regards,

Carsten
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…