diff options
| author | Nikita Bernstein | 2012-06-24 01:09:01 -0400 |
|---|---|---|
| committer | Nikita Bernstein | 2012-06-24 01:09:01 -0400 |
| commit | 765a9132f8ace733a4c05cdfbe8d172b22aad0d1 (patch) | |
| tree | b50fdffaa2a32ea5fc9616a1fe7269741f0f4359 | |
| parent | 02239cf690b8c43ed8d612cd92ac03eb7f97d620 (diff) | |
| download | LikeFeed-765a9132f8ace733a4c05cdfbe8d172b22aad0d1.tar.bz2 | |
Updated displaying the rows
| -rw-r--r-- | Resources/friendship/ui/LikeList.js | 77 | ||||
| -rw-r--r-- | Resources/images/thumbup.png | bin | 0 -> 6806 bytes |
2 files changed, 72 insertions, 5 deletions
diff --git a/Resources/friendship/ui/LikeList.js b/Resources/friendship/ui/LikeList.js index 55fafe1..f373c4a 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; } @@ -56,6 +120,9 @@ })); }); */ + + // add_test_data( ll_view ); + Ti.API.addEventListener( "processPosts", function( list ) { if( list.list.length == 0 ) 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 |
