Icon Image size in MultiList

53 views
Skip to first unread message

Pai Peng

unread,
Aug 15, 2013, 4:44:30 AM8/15/13
to codenameone...@googlegroups.com
Hello CN1,

I have created a MultiList with Designer. And the app receives data from server via JSON, with which update the Multilist. And the images are downloaded and will be inserted as icon in the MultiList, too.

The only problem is, how to automatically adjust the image size to pass the different screen size/resolution? I got bigger icon in iPhone 3GS, but smaller in iPhone 4.


Regards,

Pai

Shai Almog

unread,
Aug 15, 2013, 2:31:20 PM8/15/13
to codenameone...@googlegroups.com
Hi,
we generally set a default image to every entry which represents a blank (this effectively makes sure all entries are aligned).
The image is a multi-image and so it adapts automatically for every size.

When performing the image download itself we just use the version of the ImageDownloadService that accepts the dimensions of the desired image and we use the dimensions of the "placeholder" image as reference. Because multi-images look good in the different resolutions this works as expected.

Pai Peng

unread,
Aug 15, 2013, 5:03:52 PM8/15/13
to codenameone...@googlegroups.com
Hello Shai,

you mean I can use a multi-image as default icon for the list. and use its size for the downladed image to be displayed? Sounds fine, I will try it, Thank you.

Regards,

Pai
Reply all
Reply to author
Forward
0 new messages