public void Bind(ITimeEntryHolder dataSource, Action <TimeEntryCell> OnContinueAction)
            {
                this.OnContinueAction = OnContinueAction;

                var projectName  = "LogCellNoProject".Tr();
                var projectColor = Color.Gray;
                var clientName   = string.Empty;
                var info         = dataSource.Info;

                if (!string.IsNullOrWhiteSpace(info.ProjectData.Name))
                {
                    projectName  = info.ProjectData.Name;
                    projectColor = UIColor.Clear.FromHex(ProjectModel.HexColors [info.ProjectData.Color % ProjectModel.HexColors.Length]);

                    if (!string.IsNullOrWhiteSpace(info.ClientData.Name))
                    {
                        clientName = info.ClientData.Name;
                    }
                }

                projectLabel.TextColor = projectColor;
                if (projectLabel.Text != projectName)
                {
                    projectLabel.Text = projectName;
                    SetNeedsLayout();
                }
                if (clientLabel.Text != clientName)
                {
                    clientLabel.Text = clientName;
                    SetNeedsLayout();
                }

                var taskName    = info.TaskData.Name;
                var taskHidden  = string.IsNullOrWhiteSpace(taskName);
                var description = info.Description;
                var descHidden  = string.IsNullOrWhiteSpace(description);

                if (taskHidden && descHidden)
                {
                    description = "LogCellNoDescription".Tr();
                    descHidden  = false;
                }
                var taskDeskSepHidden = taskHidden || descHidden;

                if (taskLabel.Hidden != taskHidden || taskLabel.Text != taskName)
                {
                    taskLabel.Hidden = taskHidden;
                    taskLabel.Text   = taskName;
                    SetNeedsLayout();
                }
                if (descriptionLabel.Hidden != descHidden || descriptionLabel.Text != description)
                {
                    descriptionLabel.Hidden = descHidden;
                    descriptionLabel.Text   = description;
                    SetNeedsLayout();
                }
                if (taskSeparatorImageView.Hidden != taskDeskSepHidden)
                {
                    taskSeparatorImageView.Hidden = taskDeskSepHidden;
                    SetNeedsLayout();
                }

                // Set duration
                duration  = dataSource.GetDuration();
                isRunning = dataSource.Data.State == TimeEntryState.Running;

                RebindTags(dataSource);
                RebindDuration();
                LayoutIfNeeded();
            }
            public void Bind(ITimeEntryHolder datasource)
            {
                if (datasource == null || Handle == IntPtr.Zero)
                {
                    return;
                }

                var color = Color.Transparent;
                var ctx   = ServiceContainer.Resolve <Context> ();

                var authManager = ServiceContainer.Resolve <AuthManager> ();

                if (authManager.OfflineMode || (datasource.Data.RemoteId.HasValue && !datasource.Data.IsDirty))
                {
                    NotSyncedView.Visibility = ViewStates.Gone;
                }
                else
                {
                    NotSyncedView.Visibility = ViewStates.Visible;
                }
                var notSyncedShape = NotSyncedView.Background as GradientDrawable;

                if (datasource.Data.IsDirty && datasource.Data.RemoteId.HasValue)
                {
                    notSyncedShape.SetColor(ctx.Resources.GetColor(Resource.Color.light_gray));
                }
                else
                {
                    notSyncedShape.SetColor(ctx.Resources.GetColor(Resource.Color.material_red));
                }

                var info = datasource.Info;

                if (!string.IsNullOrWhiteSpace(info.ProjectData.Name))
                {
                    color = Color.ParseColor(ProjectModel.HexColors [info.Color % ProjectModel.HexColors.Length]);
                    ProjectTextView.SetTextColor(color);
                    ProjectTextView.Text = info.ProjectData.Name;
                }
                else
                {
                    ProjectTextView.Text = ctx.GetString(Resource.String.RecentTimeEntryNoProject);
                    ProjectTextView.SetTextColor(ctx.Resources.GetColor(Resource.Color.dark_gray_text));
                }

                if (string.IsNullOrWhiteSpace(info.ClientData.Name))
                {
                    ClientTextView.Text       = string.Empty;
                    ClientTextView.Visibility = ViewStates.Gone;
                }
                else
                {
                    ClientTextView.Text       = string.Format("{0} • ", info.ClientData.Name);
                    ClientTextView.Visibility = ViewStates.Visible;
                }

                if (string.IsNullOrWhiteSpace(info.TaskData.Name))
                {
                    TaskTextView.Text       = string.Empty;
                    TaskTextView.Visibility = ViewStates.Gone;
                }
                else
                {
                    TaskTextView.Text       = string.Format("{0} • ", info.TaskData.Name);
                    TaskTextView.Visibility = ViewStates.Visible;
                }

                if (string.IsNullOrWhiteSpace(info.Description))
                {
                    DescriptionTextView.Text = ctx.GetString(Resource.String.RecentTimeEntryNoDescription);
                }
                else
                {
                    DescriptionTextView.Text = info.Description;
                }

                BillableView.Visibility = info.IsBillable ? ViewStates.Visible : ViewStates.Gone;

                var shape = ColorView.Background as GradientDrawable;

                if (shape != null)
                {
                    shape.SetColor(color);
                }

                // Show start/stop btn
                if (datasource.Data.State == TimeEntryState.Running)
                {
                    ContinueImageButton.SetImageResource(Resource.Drawable.IcStop);
                }
                else
                {
                    ContinueImageButton.SetImageResource(Resource.Drawable.IcPlayArrowGrey);
                }

                // Set tag number
                var numberOfTags = datasource.Info.NumberOfTags;

                TagsView.BubbleCount = numberOfTags;
                TagsView.Visibility  = numberOfTags > 0 ? ViewStates.Visible : ViewStates.Gone;

                // Set duration
                duration  = datasource.GetDuration();
                isRunning = datasource.Data.State == TimeEntryState.Running;
                RebindDuration();
            }