How To Change Scroll Height Of Tableview For Orientation Changes

So I have a tableview working fine in portrait view.

 

But let’s say I want to support other orientations. On an orientation change to landscape, the bottom-most entries are now cutoff from view.

 

Can I change something dynamically?

 

I was thinking the bottomPadding property…

I"m guessing you are using a tableView that’s smaller than the screen and therefore masked.  I’ve not tried this but since you have to provide a width and height and a mask file, I would think it might be best to when you detect the orientation change would be to destroy the old table and re build it with a different width/height and mask file.  I’ll get Danny to respond since widgets are key in his memory right now.

 

Are you using Widgets 2.0 or an earlier build?

Using Widgets 2.0.

 

Currently, the list I am using goes to the bottom of the screen, so I am not using a mask.

 

Destroying it and just creating it with a new height seems like the solution.

 

I was hoping I could just change some property in the tableview instead of rebuilding it again. The bottomPadding property seemed promising, because that adjusts the bottom limit the rows can go before bouncing back.

You can adjust the bottom padding, albeit in a currently undocumented way. Try this: [lua]yourTableview._view._bottomPadding = newValue – ie 50[/lua]

And… it works.

 

Thanks guys!

I"m guessing you are using a tableView that’s smaller than the screen and therefore masked.  I’ve not tried this but since you have to provide a width and height and a mask file, I would think it might be best to when you detect the orientation change would be to destroy the old table and re build it with a different width/height and mask file.  I’ll get Danny to respond since widgets are key in his memory right now.

 

Are you using Widgets 2.0 or an earlier build?

Using Widgets 2.0.

 

Currently, the list I am using goes to the bottom of the screen, so I am not using a mask.

 

Destroying it and just creating it with a new height seems like the solution.

 

I was hoping I could just change some property in the tableview instead of rebuilding it again. The bottomPadding property seemed promising, because that adjusts the bottom limit the rows can go before bouncing back.

You can adjust the bottom padding, albeit in a currently undocumented way. Try this: [lua]yourTableview._view._bottomPadding = newValue – ie 50[/lua]

And… it works.

 

Thanks guys!