public void UpdateCell (TweetViewModel showTweet) { tweet = showTweet; handle.Text = tweet.Username; user.Text = tweet.RealName; date.Text = tweet.PublishedAgo; tweetLabel.Text = tweet.Title; var u = new Uri (tweet.ImageUrl); var img = ImageLoader.DefaultRequestImage (u,this); if(img != null) image.Image = RemoveSharpEdges (img); }
public TweetCell (UITableViewCellStyle style, NSString ident, TweetViewModel Tweet) : base (style, ident) { SelectionStyle = UITableViewCellSelectionStyle.Blue; user = new UILabel () { TextAlignment = UITextAlignment.Left, Font = UIFont.FromName("Helvetica-Light",AppDelegate.Font16pt), BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f) }; handle = new UILabel () { TextAlignment = UITextAlignment.Left, Font = UIFont.FromName("Helvetica-Light",AppDelegate.Font9pt), TextColor = UIColor.LightGray, BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f) }; date = new UILabel () { TextAlignment = UITextAlignment.Right, Font = UIFont.FromName("Helvetica-Light",AppDelegate.Font9pt), TextColor = UIColor.DarkGray, BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f) }; tweetLabel = new UILabel () { TextAlignment = UITextAlignment.Left, Font = UIFont.FromName("Helvetica-Light",AppDelegate.Font10_5pt), BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f), LineBreakMode = UILineBreakMode.WordWrap, Lines = 0 }; image = new UIImageView(); UpdateCell (Tweet); ContentView.Add (user); ContentView.Add (handle); ContentView.Add (tweetLabel); ContentView.Add (image); ContentView.Add (date); }
//MWC.iOS.Screens.iPad.Twitter.TwitterSplitView splitView; /// <summary> /// for iPhone /// </summary> public TweetElement (TweetViewModel showTweet) : base (showTweet.Author) { tweet = showTweet; }