Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Row className + top/bottom padding = bad (bug?)

If you specify a top and bottom padding for rows within a tableview and then give the row a className, the text will not display correctly after it's changed.

I've put together some short example code:
app.js
functions.js

It's just a simple grouped table view with a single row. The label within the row has 10 pixels of padding on the top and the bottom and a className. Clicking the refresh button reloads the row with new text. The problem should be visible every time you hit refresh.

Anyone have an idea on a workaround? I can't find an alternative way to provide padding other than the top/bottom attributes of the label.

— asked November 2nd 2010 by Mike Dosey
  • bottom
  • bug
  • classname
  • display
  • iphone
  • mobile
  • padding
  • row
  • tableview
  • top
0 Comments

1 Answer

  • If anyone else ever runs into this bug, I ended up omitting the padding and instead prepending and appending "\n" to the text to work around the problem.

    — answered December 11th 2010 by Mike Dosey
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.