public void UpdateCell(AdvancedCell cell) { StartTextView.Text = cell.Start; EndTextView.Text = cell.End; TitleTextView.Text = cell.Title; BusToTextView.Text = cell.BusTo; BusFromTextView.Text = cell.BusFrom; PlaceTextView.Text = cell.Place; Details.Visibility = cell.IsSelected ? ViewStates.Visible : ViewStates.Gone; PlaceTextView.Visibility = cell.IsPlace ? ViewStates.Visible : ViewStates.Gone; Bus.Visibility = cell.IsBus ? ViewStates.Visible : ViewStates.Gone; if (Device.Idiom == TargetIdiom.Phone) { StartTextView.TextSize = EndTextView.TextSize = DashTextView.TextSize = TitleTextView.TextSize = cell.PhoneMainTextSize; BusToTextView.TextSize = BusFromTextView.TextSize = PlaceTextView.TextSize = cell.PhoneDetailTextSize; TitleTextView.SetMaxLines(cell.PhoneMaxLines); } else { StartTextView.TextSize = EndTextView.TextSize = DashTextView.TextSize = TitleTextView.TextSize = cell.TabletMainTextSize; BusToTextView.TextSize = BusFromTextView.TextSize = PlaceTextView.TextSize = cell.TabletDetailTextSize; TitleTextView.SetMaxLines(cell.TabletMaxLines); } BackLayout.SetBackgroundColor(cell.BackgroundColor.ToAndroid()); }
void ReleaseDesignerOutlets() { if (BackLayout != null) { BackLayout.Dispose(); BackLayout = null; } if (InputLayout != null) { InputLayout.Dispose(); InputLayout = null; } if (MessageList != null) { MessageList.Dispose(); MessageList = null; } if (MessageText != null) { MessageText.Dispose(); MessageText = null; } if (CalloutImage != null) { CalloutImage.Dispose(); CalloutImage = null; } if (SendButton != null) { SendButton.Dispose(); SendButton = null; } }