diff options
| author | Anqi Xu | 2012-06-24 01:38:44 -0400 |
|---|---|---|
| committer | Anqi Xu | 2012-06-24 01:38:44 -0400 |
| commit | 1efd8c8a45ad2963cad0814cbd7acc5e460ee372 (patch) | |
| tree | 566e0fee4b44eebd8d55896cd163bb870c4e9db2 | |
| parent | 020def806678f46fc39a2baad5a48e58c41ec742 (diff) | |
| parent | ebe3abd8fd8a9dc3b313aa088229e79da2e270d2 (diff) | |
| download | LikeFeed-1efd8c8a45ad2963cad0814cbd7acc5e460ee372.tar.bz2 | |
Merge branch 'master' of github.com:teddywing/LikeFeed
| -rw-r--r-- | Resources/friendship/ui/LikeList.js | 74 | ||||
| -rw-r--r-- | Resources/images/thumbup.png | bin | 0 -> 6806 bytes |
2 files changed, 69 insertions, 5 deletions
diff --git a/Resources/friendship/ui/LikeList.js b/Resources/friendship/ui/LikeList.js index 9d334fc..d60004f 100644 --- a/Resources/friendship/ui/LikeList.js +++ b/Resources/friendship/ui/LikeList.js @@ -1,4 +1,29 @@ (function() { + function add_test_data(ll_view) + { + ll_view.appendRow( + create_row( { + pic_square: "images/fb_test_profile.jpg", + name: "Test Name", + description: "Description Description Description Description Description Description Description Description Description Description Description Description ", + fan_count: "15", + page_url: "http://www.google.com", + website: "http://www.google.com" + } ) + ); + + ll_view.appendRow( + create_row( { + pic_square: "images/fb_test_profile.jpg", + name: "Test Name", + description: "Description Description Description Description Description Description Description Description Description Description Description Description ", + fan_count: "2", + page_url: "http://www.google.com", + website: "http://www.google.com" + } ) + ); + } + function create_row( key ) { // Ti.UI.createAlertDialog( {title:"key " + key.name} ).show(); @@ -14,7 +39,6 @@ }); /* - description fan_count page_url website @@ -28,20 +52,60 @@ top:0 }); - var content = Ti.UI.createLabel({ + var thumb_icon = Ti.UI.createImageView({ + image:"images/thumbup.png", + width:15, + height:15, + left:profile_icon.width + 2, + top:2 + }); + + var fan_c = Ti.UI.createLabel({ + text: key.fan_count, + font:{fontSize:10,fontWeight:'bold'}, + color:'#3b5997', + //backgroundColor:'lightblue', + width:'auto', + textAlign:'center', + top:2, + left:thumb_icon.left + thumb_icon.width + 2, + height:'auto' + }); + + if( fan_c.width < 10 ) fan_c.width = 10; + + var title = Ti.UI.createLabel({ text:key.name, font:{fontSize:12,fontWeight:'bold'}, width:'auto', textAlign:'left', top:2, - left:52, - height:26 + left:fan_c.left + fan_c.width + 2, + height:'auto', + wordWrap:'true' + }); + + var description = Ti.UI.createLabel({ + text:key.description, + font:{fontSize:12,fontWeight:'single'}, + width:'auto', + textAlign:'left', + top: title.height, + left:profile_icon.width + 2, + height:36, + wordWrap:'true', + html:true }); + + row.height = 50; row.add( profile_icon ); - row.add( content ); + row.add( thumb_icon ); + row.add(fan_c); + row.add( title ); + row.add( description ); return row; } diff --git a/Resources/images/thumbup.png b/Resources/images/thumbup.png Binary files differnew file mode 100644 index 0000000..52d5920 --- /dev/null +++ b/Resources/images/thumbup.png |
