[Resolved] newTableView: How to prevent bounce back?

tl;dr: If I set a mask, my list view always bounces back to the top when I release press?

I’m guessing I’m making some fairly obvious error. (Unless you’re me, of course.)

  1. I’ve set a custom height and a mask to match (height=880, mask size is 884x644, iPhone 4)
  2. The mask doesn’t show unless I also set list.y = 80 (i.e.: the button isn’t cut)
  3. With or without the y setting, any drag press just releases it back to the original (top row) position.

Any ideas? [import]uid: 41884 topic_id: 24784 reply_id: 324784[/import]

Strangely enough, it seems as though this feature now works without masks, at least in the limited method I’m using.

local listOptions = { top=80, left=0 }

What that should do is offset the list so that the final row (in my case, row 20) will always snap back offscreen since I haven’t defined the list height.

What it does do is basically the same thing as a mask.

  1. No unwanted snapback
  2. The bottom of the screen is the bottom of the tableView (!)
  3. The top is semi clipped. Obviously this looks nicer with a mask, but since the mask breaks how the widget works, we can get the same thing by just appending a newRect.
local rect = display.newRect(0, 0, display.contentWidth, 80)

At least in the OSX simulator (781), not using a mask gives me the benefits of a mask. Go figure. [import]uid: 41884 topic_id: 24784 reply_id: 100652[/import]

Alright, solved.

The basic problem is that config.lua must be defined in tune with your mask. If your config resolution is 320x480 (3GS) but your mask is Retina sized, bad things happen™. [import]uid: 41884 topic_id: 24784 reply_id: 101858[/import]

What should the config file look like? [import]uid: 180235 topic_id: 24784 reply_id: 125620[/import]

[code]application =
{
orientation =
{
default = “portrait”,
supported = { “portrait”, “portraitUpsideDown” }
},

content =
{
width = 320,
height = 480,
scale = “letterbox”,
fps = 60,
antialias = false,

imageSuffix =
{
["@2"] = 2,
},

},
} [/code]

You don’t need everything from there, but the basic lesson is that your masks need to be related to the config.lua resolution, not to the resolution of whatever device the simulator shows. Corona will then scale it as necessary. [import]uid: 41884 topic_id: 24784 reply_id: 125757[/import]

What should the config file look like? [import]uid: 180235 topic_id: 24784 reply_id: 125620[/import]

[code]application =
{
orientation =
{
default = “portrait”,
supported = { “portrait”, “portraitUpsideDown” }
},

content =
{
width = 320,
height = 480,
scale = “letterbox”,
fps = 60,
antialias = false,

imageSuffix =
{
["@2"] = 2,
},

},
} [/code]

You don’t need everything from there, but the basic lesson is that your masks need to be related to the config.lua resolution, not to the resolution of whatever device the simulator shows. Corona will then scale it as necessary. [import]uid: 41884 topic_id: 24784 reply_id: 125757[/import]