How to change tableView library in Corona SDK for Retina Graphics

I am viewing the Corona SDK and want to adapt the coffee demo ( http://blog.anscamobile.com/2010/09/create-scrolling-list-views-with-text-and-graphics-in-coronasdk-ios-android-tutorial/ ) so that it uses the Retina Display @ 2x image configuration described here: http://blog.anscamobile.com/2011/01/dynamic-image-resolution-made-easy/

What do I need to do to integrate the Retina 4 material into the tableView library and thus make the image compatible with Coffee Demo 4?

+7
source share
2 answers

This is actually an “Interface Widget” available in Corona that creates View tables that are compatible with retina displays:

http://developer.anscamobile.com/reference/index/widgetnewtableview

And even more Corona SDK UI widgets: http://developer.anscamobile.com/content/widget

+3
source

the answer to the second link you provided ... I quote:

As noted above, dynamic image resolution works in conjunction with scaling of dynamic content (documented in the "Project Configuration" section of the documentation). For further reference, documents with dynamic image resolution are.

To use this function, you basically need to do two things:

  • Use display.newImageRect (), not display.newImage () when loading images
  • Specify one or more scaling thresholds in your projects config.lua file The syntax is as follows:

display.newImageRect ([parentGroup,] filename [, baseDirectory] imageWidth, imageHeight)

  • imageWidth is the width of the base images in the base dimensions of the content.

  • imageHeight is the height of the base images in the base sizes of the content.

  • parentGroup and baseDirectory are optional and may be omitted; they behave just like their counterparts in display.newImage ().
0
source

All Articles