diff options
| author | Nikita Bernstein | 2012-06-23 22:44:00 -0400 |
|---|---|---|
| committer | Nikita Bernstein | 2012-06-23 22:44:04 -0400 |
| commit | 94c2bacfea914eef4bab6f744005ab73c198809d (patch) | |
| tree | 537c9098fdab0e8628279b866e033758933520a8 | |
| parent | 7198316ea93dd6729f3f86d8a1ae2414ce455cd9 (diff) | |
| download | LikeFeed-94c2bacfea914eef4bab6f744005ab73c198809d.tar.bz2 | |
Playing around with table row.
| -rw-r--r-- | Resources/friendship/ui/LikeList.js | 36 | ||||
| -rw-r--r-- | Resources/images/fb_test_profile.jpg | bin | 0 -> 2385 bytes |
2 files changed, 35 insertions, 1 deletions
diff --git a/Resources/friendship/ui/LikeList.js b/Resources/friendship/ui/LikeList.js index 8552b56..c3a48d7 100644 --- a/Resources/friendship/ui/LikeList.js +++ b/Resources/friendship/ui/LikeList.js @@ -1,7 +1,41 @@ (function() { + function create_row( title ) + { + // Reason for Factory: templating format of the row + var row = Ti.UI.createTableViewRow(); + + var profile_icon = Ti.UI.createImageView({ + url:"images/fb_test_profile.jpg", + width:50, + height:50, + left:0, + top:0 + }); + + var content = Ti.UI.createLabel({ + text:title, + font:{fontSize:12,fontWeight:'bold'}, + width:'auto', + textAlign:'left', + top:2, + left:52, + height:26 + }); + + row.height = 50; + + row.add( profile_icon ); + row.add( content ); + + return row; + } + fs.ui.createLikeList = function() { var ll_view = Ti.UI.createTableView(); + ll_view.appendRow( create_row( 'OMG, I like totally like Skrillex.') ); + ll_view.appendRow( create_row( 'Seriously, this is amazing. You totally need to party.') ); + return ll_view; }; -})(); + })(); diff --git a/Resources/images/fb_test_profile.jpg b/Resources/images/fb_test_profile.jpg Binary files differnew file mode 100644 index 0000000..57a8efa --- /dev/null +++ b/Resources/images/fb_test_profile.jpg |
